home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1994 October / macformat-005.iso / Shareware City / Developers / xlispmac / lisp / GLOS.TXT < prev    next >
Encoding:
Text File  |  1994-05-28  |  122.6 KB  |  2,725 lines  |  [TEXT/ALFA]

  1. .t - boolean value "true" is constant with value t.
  2.  
  3. .self -  within a method  context, the  current object  (see page  19),
  4.      otherwise initially unbound.
  5.  
  6. .object - constant, value is the class 'Object.'
  7.  
  8. .class - constant, value is the class 'Class'.
  9.  
  10. .internal-time-units-per-second  - integer constant  to divide returned
  11.      times by to get time in seconds.
  12.  
  13. .pi - floating  point aproximation  of pi (constant  defined when  math
  14.      extension is compiled).
  15.  
  16. .*obarray* - the  object hash table. Length  of array is  a compilation
  17.      option. Objects are hashed using the hash function and are placed on a
  18.      list in the appropriate array slot. This variable does note exist when
  19.      the package feature is compiled in.
  20.  
  21. .*package*  - the current  package. Do not  alter. Part of  the package
  22.      feature.
  23.  
  24. .*terminal-io* - stream bound to keyboard and display. Do not alter.
  25.  
  26. .*standard-input*  - the  standard  input stream,  initially stdin.  If
  27.      stdin is not  redirected on  the command line,  then *terminal-io*  is
  28.      used so that all interactive i/o uses the same stream.
  29.  
  30. .*standard-output* -  the standard output stream,  initially stdout. If
  31.      stdout is not  redirected on  the command line  then *terminal-io*  is
  32.      used so that all interactive i/o uses the same stream.
  33.  
  34. .*error-output* - the error output stream (used by all error messages),
  35.      initially same as *terminal-io*.
  36.  
  37. .*trace-output* - the trace output stream (used by the trace function),
  38.      initially same as *terminal-io*.
  39.  
  40. .*debug-io*   -  the  break   loop  i/o   stream,  initially   same  as
  41.      *terminal-io*. System messages  (other than error messages) also print
  42.      out on this stream.
  43.  
  44. .*breakenable* -  flag controlling entering  break loop on  errors (see
  45.      page 4)
  46.  
  47. .*tracelist* -  list of names  of functions to  trace, as set  by trace
  48.      function.
  49.  
  50. .*tracenable* - enable trace back printout on errors (see page 4).
  51.  
  52. .*tracelimit*  - number of levels  of trace back  information (see page
  53.      4).
  54.  
  55. .*evalhook* - user substitute  for the evaluator function (see  page 8,
  56.      and evalhook and applyhook functions).
  57.  
  58. .*applyhook* -  user substitute for  function application (see  page 8,
  59.      and evalhook and applyhook functions).
  60.  
  61. .*readtable* - the current readtable (see page 12).
  62.  
  63. .*gc-flag*  - controls  the printing  of gc  messages. When  non-NIL, a
  64.      message  is printed  after each  garbage collection  giving  the total
  65.      number of nodes and the number of nodes free.
  66.  
  67. .*gc-hook* - function to call after garbage collection (see page 8).
  68.  
  69. .*integer-format* - format for  printing integers (when not bound  to a
  70.      string, defaults to "%d" or "%ld" depending on implementation)
  71.  
  72. .*ratio-format*  -  format for  printing ratios  (when  not bound  to a
  73.      string, defaults to "%d/%d" or "%ld/%ld" depending on implementation)
  74.  
  75. .*float-format*  -  format for  printing floats  (when  not bound  to a
  76.      string, defaults to "%g")
  77.  
  78. .*readtable-case*  - symbol  read  and output  case.  See page  14  for
  79.      details
  80.  
  81. .*print-case*  -  symbol output  case when  printing.  See page  14 for
  82.      details
  83.  
  84. .*print-level* - When bound to a number, list levels  beyond this value
  85.      are printed as '#'. Used by all printing functions. Good precaution to
  86.      avoid getting caught in circular lists.
  87.  
  88. .*print-length* - When bound  to a number, lists longer than this value
  89.      are  printed as '...'. Used by all printing functions. Good precaution
  90.      to avoid getting caught in circular lists.
  91.  
  92. .*dos-input* - When not NIL, uses dos line input function for read (see
  93.      page 3).
  94.  
  95. .*displace-macros*  -  When  not  NIL,  macros  are  replaced  by their
  96.      expansions when exectuted (see page 7).
  97.  
  98. .*random-state* - the default random-state used by the random function.
  99.  
  100. .*features* - list of features, initially (:xlisp), used for  #+ and #-
  101.      reader macros.
  102.  
  103. .*startup-functions*  - list of functions to be executed when workspace
  104.      started
  105.  
  106. .*command-line* -  the xlisp  command line,  in the form  of a  list of
  107.      strings, one string per argument.
  108.  
  109. .*load-file-arguments* - When  not NIL, file  arguements are loaded  at
  110.      startup.
  111.  
  112. .*top-level-loop* - Top  level loop to utilize,  defaults to TOP-LEVEL-
  113.      LOOP. Note that this function can  only be restarted by executing TOP-
  114.      LEVEL, and it never exits.
  115.  
  116. .*read-suppress* - When not NIL, inhibits certain parts of reading. Used by
  117.      the #+ and #- macros.
  118.  
  119.  
  120. .+ 
  121. .++ 
  122. .+++ 
  123. .* 
  124. .** 
  125. .*** 
  126. There  are  several symbols  maintained  by the  read/eval/print  loop. The
  127. symbols  '+', '++',  and '+++'  are bound  to the  most recent  three input
  128. expressions. The symbols '*', '**'  and '***' are bound to the  most recent
  129. three results.  The symbol '-' is  bound to the expression  currently being
  130. evaluated. It becomes the value of '+' at the end of the evaluation.
  131.  
  132. (eval <expr>)                                  EVALUATE AN XLISP EXPRESSION
  133.      <expr>    the expression to be evaluated
  134.      returns   the result of evaluating the expression
  135.  
  136. (apply <fun> <arg>...<args>)        APPLY A FUNCTION TO A LIST OF ARGUMENTS
  137.      <fun>     the function to apply (or function symbol). May not be macro
  138.                or fsubr.
  139.      <arg>     initial arguments, which are CONSed to...
  140.      <args>    the argument list
  141.      returns   the result of applying the function to the arguments
  142.  
  143. (funcall <fun> <arg>...)                     CALL A FUNCTION WITH ARGUMENTS
  144.      <fun>     the  function to call (or function symbol). May not be macro
  145.                or fsubr.
  146.      <arg>     arguments to pass to the function
  147.      returns   the result of calling the function with the arguments
  148.  
  149. (quote <expr>)                             RETURN AN EXPRESSION UNEVALUATED
  150.      fsubr
  151.      <expr>    the expression to be quoted (quoted)
  152.      returns   <expr> unevaluated
  153.  
  154. (function <expr>)                         GET THE FUNCTIONAL INTERPRETATION
  155.      fsubr
  156.      <expr>    the symbol or lambda expression (quoted)
  157.      returns   the functional interpretation
  158.  
  159. (complement <fun>)                            MAKE A COMPLEMENTARY FUNCTION
  160.      This  function is intended to eliminate the need for -IF-NOT functions
  161.      and :TEST-NOT keys by providing a way to make complementary functions.
  162.      <fun>     the function or closure (not macro or fsubr)
  163.      returns   a new function closure that returns NOT of the result of the
  164.                original function.
  165.  
  166. (identity <expr>)                                     RETURN THE EXPRESSION
  167.      <expr>    the expression
  168.      returns   the expression
  169.  
  170. (backquote <expr>)                                       FILL IN A TEMPLATE
  171.      fsubr. Note: an improved backquote facility, which works properly when
  172.      nested, is available by loading the file backquot.lsp.
  173.      <expr>    the template (quoted)
  174.      returns   a copy of  the template with comma  and comma-at expressions
  175.                expanded.
  176.  
  177. (comma <expr>)                                             COMMA EXPRESSION
  178.      (Never  executed)  As   the  object  of  a  backquote  expansion,  the
  179.      expression is evaluated and becomes an object in the enclosing list.
  180.  
  181. (comma-at <expr>)                                       COMMA-AT EXPRESSION
  182.      (Never  executed)   As  the  object  of  a  backquote  expansion,  the
  183.      expression is  evaluated (and  must evaluate  to a  list) and  is then
  184.      spliced into the enclosing list.
  185.  
  186. (lambda <args> <expr>...)                           MAKE A FUNCTION CLOSURE
  187.      fsubr
  188.      <args>    formal argument list (lambda list) (quoted)
  189.      <expr>    expressions of the function body (quoted)
  190.      returns   the function closure
  191.  
  192. (get-lambda-expression <closure>)                 GET THE LAMBDA EXPRESSION
  193.      <closure> the closure
  194.      returns   the original  lambda expression,  or NIL  if not  a closure.
  195.                Second  return  value  is  T  if closure  has  a  non-global
  196.                environment, and the third  return value is the name  of the
  197.                closure.
  198.  
  199. (macroexpand <form>)                         RECURSIVELY EXPAND MACRO CALLS
  200.      <form>    the form to expand
  201.      returns   the macro expansion
  202.  
  203. (macroexpand-1 <form>)                                  EXPAND A MACRO CALL
  204.      <form>    the macro call form
  205.      returns   the macro expansion
  206.  
  207. (multiple-value-bind <varlist> <vform> [<form>...])
  208.                                       BIND RETURN VALUES INTO LOCAL CONTEXT
  209.      defined as macro in common.lsp
  210.      <vform>   form to be evaluated
  211.      <varlist> list of variables to bind to return values of vform
  212.      <form>    forms  evaluated   sequentially,  as  in  LET,  using  local
  213.                bindings
  214.      returns   values of last form evaluated, or NIL if no forms
  215.  
  216. (multiple-value-call <fun> <form> ...)    COLLECT VALUES AND APPLY FUNCTION
  217.      fsubr
  218.      <fun>     function to apply
  219.      <form>    forms, which are evaluated, with result values collected
  220.      returns   result of applying fun to all of  the returned values of the
  221.                forms
  222.  
  223. (multiple-value-list <form>)   COLLECT MULTIPLE RETURNED VALUES INTO A LIST
  224.      defined as macro in common.lsp
  225.      <form>    form to be evaluated
  226.      returns   list of returned values
  227.  
  228. (multiple-value-prog1 <form> [<form> ...])      RETURN VALUES OF FIRST FORM
  229.      fsubr
  230.      <form>    one or more forms, which are evaluated sequentially
  231.      returns   the result values of the first form
  232.  
  233. (multiple-value-setq <varlist> <form>)      BIND RETURN VALUES TO VARIABLES
  234.      defined as macro in common.lsp
  235.      <form>    form to be evaluated
  236.      <varlist> list of variables to bind to return values of form
  237.      returns   (undefined, implementation dependent)
  238.  
  239. (nth-value <index> <form>)                           EXTRACT A RETURN VALUE
  240.      fsubr
  241.      <index>   index into return values
  242.      <form>    form which gets evaluated
  243.      returns   the nth result value of exectuing the form
  244.  
  245. (values [<expr>])                                    RETURN MULTIPLE VALUES
  246.      <expr>    expression(s) to be evaluated
  247.      returns   each argument as a separate value
  248.  
  249. (values-list <list>)                       RETURN MULTIPLE VALUES FROM LIST
  250.      defined in common.lsp
  251.      <list>    a list
  252.      returns   each list element as a separate value
  253.  
  254. (set <sym> <expr>)                         SET THE GLOBAL VALUE OF A SYMBOL
  255.      <sym>     the symbol being set
  256.      <expr>    the new value
  257.      returns   the new value
  258.  
  259. (setq [<sym> <expr>]...)                          SET THE VALUE OF A SYMBOL
  260.      fsubr
  261.      <sym>     the symbol being set (quoted)
  262.      <expr>    the new value
  263.      returns   the last new value or NIL if no arguments
  264.  
  265. (psetq [<sym> <expr>]...)                          PARALLEL VERSION OF SETQ
  266.      fsubr. All  expressions are evaluated before  any assignments are
  267.      made.
  268.      <sym>     the symbol being set (quoted)
  269.      <expr>    the new value
  270.      returns   NIL
  271.  
  272. (setf [<place> <expr>]...)                         SET THE VALUE OF A FIELD
  273.      fsubr
  274.      <place> the field specifier  (if a macro it is expanded, then the form
  275.              arguments are evaluated):
  276.              <sym>                 set value of a symbol
  277.              (car <expr>)          set car of a cons node
  278.              (cdr <expr>)          set cdr of a cons node
  279.              (nth <n> <expr>)      set nth car of a list
  280.              (aref <expr> <n>)     set nth element of an array or string
  281.              (elt <expr> <n>)      set nth element of a sequence
  282.              (get <sym> <prop> [<dflt>])     set   value   of  a   symbol's
  283.                                              property
  284.              (getf <pl> <prop> [<dflt>])     set value of a  property. <pl>
  285.                                              must   be    a   valid   field
  286.                                              specifier.
  287.              (symbol-value <sym>)  set global value of a symbol
  288.              (symbol-function <sym>)         set  functional   value  of  a
  289.                                              symbol
  290.              (symbol-plist <sym>)  set property list of a symbol
  291.              (gethash <key> <tbl> <def>)     add  or   replace  hash  table
  292.              entry. <def> is ignored
  293.              (send <obj> :<ivar>)  (When  classes.lsp  used), set  instance
  294.                                    variable of object.
  295.              (<sym>-<element> <struct>)      set  the element  of structure
  296.                                              struct, type sym.
  297.              (<fieldsym> <args>)   the function stored  in property  *setf*
  298.                                    in  symbol  <fieldsym>  is   applied  to
  299.                                    (<args> <expr>). As an  alternative, the
  300.                                    function     stored      in     property
  301.                                    *setf-lambda*    is  applied,  then  the
  302.                                    result is evaled in the current context.
  303.      <expr>  the new value
  304.      returns the last new value, or NIL if no arguments
  305.  
  306. (psetf [<place> <expr>]...)                        PARALLEL VERSION OF SETF
  307.      fsubr. All  expressions are evaluated  and macro place  forms expanded
  308.      before any assignments are made.
  309.      <place>   the field specifier (see SETF, above)
  310.      <expr>    the new value
  311.      returns   NIL
  312.  
  313. (defsetf <sym> <fcn>)                         DEFINE A SETF FIELD SPECIFIER
  314. (defsetf <sym> <fargs> (<value>) <expr>...)
  315.      Defined  as macro  in common.lsp.  Convenient, Common  Lisp compatible
  316.      alternative to setting *setf* or *setf-lambda* property directly.
  317.      <sym>     field specifier symbol (quoted)
  318.      <fcn>     function  to  use  (quoted  symbol)  which  takes  the  same
  319.                arguments as the field specifier plus an additional argument
  320.                for the value. The value must be returned.
  321.      <fargs>   formal argument list of unevaluated arguments (lambda  list)
  322.                (quoted)
  323.      <value>   symbol bound to value to store (quoted).
  324.      <expr>    The last expression  must an expression  to evaluate in  the
  325.                setf  context.In this  respect, defsetf  works like  a macro
  326.                definition.
  327.      returns   the field specifier symbol
  328.  
  329. (push  <expr> <place>)                                      CONS TO A FIELD
  330.      Defined as macro  in common.lsp. Only  evaluates place form  arguments
  331.      one time. It is recommended that *displace-macros* be non-NIL for best
  332.      performance.
  333.      <place>   field specifier being modified (see setf)
  334.      <expr>    value to cons to field
  335.      returns   the new value which is (CONS <expr> <place>)
  336.  
  337. (pushnew <expr> <place> &key :test :test-not :key)      CONS NEW TO A FIELD
  338.      Defined  as macro in  common.lsp. Only evaluates  place form arguments
  339.      one time. It is recommended that *displace-macros* be non-NIL for best
  340.      performance.
  341.      <place>   field specifier being modified (see setf)
  342.      <expr>    value to cons to field, if not already MEMBER of field
  343.      :test     the test function (defaults to eql)
  344.      :test-not the test function (sense inverted)
  345.      :key      function to  apply to test function  list argument (defaults
  346.                to identity)
  347.      returns   the new value which is (CONS <expr> <place>) or <place>
  348.  
  349. (pop <place>)                               REMOVE FIRST ELEMENT OF A FIELD
  350.      Defined  as macro in  common.lsp. Only evaluates  place form arguments
  351.      one time. It is recommended that *displace-macros* be non-NIL for best
  352.      performance.
  353.      <place>   the field being modified (see setf)
  354.      returns   (CAR <place>), field changed to (CDR <place>)
  355.  
  356. (incf <place> [<value>])                                  INCREMENT A FIELD
  357. (decf <place> [<value>])                                  DECREMENT A FIELD
  358.      Defined as  macro in common.lsp.  Only evaluates place  form arguments
  359.      one time. It is recommended that *displace-macros* be non-NIL for best
  360.      performance.
  361.      <place>   field specifier being modified (see setf)
  362.      <value>   Numeric value (default 1)
  363.      returns   the new value  which is  (+ <place> <value>)  or (-  <place>
  364.                <value>)
  365.  
  366. (defun <sym> <fargs> <expr>...)                           DEFINE A FUNCTION
  367. (defmacro <sym> <fargs> <expr>...)                           DEFINE A MACRO
  368.      fsubr
  369.      <sym>     symbol being defined (quoted)
  370.      <fargs>   formal argument list (lambda list) (quoted)
  371.      <expr>    expressions constituting the body of the function (quoted)
  372.      returns   the function symbol
  373.  
  374. (gensym [<tag>])                                          GENERATE A SYMBOL
  375.      <tag>     string or number
  376.      returns   the new symbol, uninterned
  377.  
  378. (intern <pname> [<package>])                        MAKE AN INTERNED SYMBOL
  379.      <pname>   the symbol's print name string
  380.      <package> the package (defaults to current package)
  381.      returns   the new symbol.  A second value is returned which  is NIL if
  382.                the symbol did not pre-exist, :internal if it is an internal
  383.                symbol, :external if it is an external symbol, or :inherited
  384.                if it inherited via USE-PACKAGE.
  385.  
  386. (make-symbol <pname>)                             MAKE AN UNINTERNED SYMBOL
  387.      <pname>   the symbol's print name string
  388.      returns   the new symbol
  389.  
  390. (symbol-name <sym>)                          GET THE PRINT NAME OF A SYMBOL
  391.      <sym>     the symbol
  392.      returns   the symbol's print name
  393.  
  394. (symbol-value <sym>)                              GET THE VALUE OF A SYMBOL
  395.      <sym>     the symbol
  396.      returns   the symbol's value
  397.  
  398. (symbol-function <sym>)                GET THE FUNCTIONAL VALUE OF A SYMBOL
  399.      <sym>     the symbol
  400.      returns   the symbol's functional value
  401.  
  402. (symbol-plist <sym>)                      GET THE PROPERTY LIST OF A SYMBOL
  403.      <sym>     the symbol
  404.      returns   the symbol's property list
  405.  
  406. (hash <expr> <n>)                                    COMPUTE THE HASH INDEX
  407.      <expr>    the object to hash
  408.      <n>       the table size (positive integer)
  409.      returns   the hash index (integer 0 to n-1)
  410.  
  411. (makunbound <sym>)                           MAKE A SYMBOL VALUE BE UNBOUND
  412.      You cannot unbind constants.
  413.      <sym>     the symbol
  414.      returns   the symbol
  415.  
  416. (fmakunbound <sym>)                       MAKE A SYMBOL FUNCTION BE UNBOUND
  417.      <sym>     the symbol
  418.      returns   the symbol
  419.  
  420. (unintern <sym> [<package>])                              UNINTERN A SYMBOL
  421.      Defined in common.lsp if package feature not compiled.
  422.      <sym>     the symbol
  423.      <package> the package to look in for the symbol
  424.      returns   t if successful, NIL if symbol not interned
  425.  
  426. (defconstant <sym> <val> [<comment>])                     DEFINE A CONSTANT
  427.      fsubr.
  428.      <sym>     the symbol
  429.      <val>     the value
  430.      <comment> optional comment string (ignored)
  431.      returns   the value
  432.  
  433. (defparameter <sym> <val> [<comment>])                   DEFINE A PARAMETER
  434.      fsubr.
  435.      <sym>     the symbol
  436.      <val>     the value
  437.      <comment> optional comment string (ignored)
  438.      returns   the value
  439.  
  440. (defvar <sym> [<val> [<comment>]])                        DEFINE A VARIABLE
  441.      fsubr. Variable only initialized if not previously defined.
  442.      <sym>     the symbol
  443.      <val>     the initial value, or NIL if absent.
  444.      <comment> optional comment string (ignored)
  445.      returns   the current value
  446.  
  447. (mark-as-special <sym> [<flag>])                      SET SPECIAL ATTRIBUTE
  448.      Also see definition of PROCLAIM and DECLARE.
  449.      <sym>     symbol to mark
  450.      <flag>    non-nil to make into a constant
  451.      returns   nil,  with  symbol  marked  as  special  and  possibly as  a
  452.                constant.
  453.  
  454. (declare [<declaration> ...])                   DECLARE ARGUMENT ATTRIBUTES
  455.      Macro  in  common.lsp  provided  to  assist  in  porting  Common  Lisp
  456.      applications to XLISP-PLUS.
  457.      <declaration>       list of local variable and attributes
  458.      returns   nil, produces an error message if attribute SPECIAL is used.
  459.  
  460. (proclaim <proc>)                         PROCLAIM GLOBAL SYMBOL ATTRIBUTES
  461.      Function in  common.lsp  provided to  assist  in porting  Common  Lisp
  462.      applications to XLISP-PLUS.
  463.      <proc>    a list of  symbols. If the CAR of the  list is SPECIAL, then
  464.                the remaining symbols are marked as special variables.
  465.  
  466. (apropos <string> [<package>])                SEARCH SYMBOLS FOR NAME MATCH
  467. (apropos-list <string> [<package>])
  468.      Functions in common.lsp.
  469.      <string>  find symbols which contain this string as substring of print
  470.                name
  471.      <package> package to search, if absent, or NIL, search all packages
  472.      returns   apropos-list returns  list of symbols, apropos  prints them,
  473.                along with some information, and returns nothing.
  474.  
  475. (defpackage <package> [<option>...])                   (RE)DEFINE A PACKAGE
  476.      Macro in common.lsp. Use to define a package, or redefine a package.
  477.      <package> the name of the package to (re)define
  478.      <option>  any one or more of the following, none evaluated, applied in
  479.                this order:
  480.      (:shadow <symbol>...)
  481.                one or more symbols to shadow, as in function SHADOW
  482.      (:shadowing-import-from <symbol>...)
  483.                one   or   more   symbols   to  shadow,   as   in   function
  484.                SHADOWING-IMPORT
  485.      (:use <package>...)
  486.                one or more packages to "use", as in function USE-PACKAGE
  487.      (:import-from <package> <symbol>...)
  488.                one  or more  symbols  to import  from  the package,  as  in
  489.                function IMPORT
  490.      (:intern <symbol>...)
  491.                one  or  more  symbols to  be  located  or  created in  this
  492.                package, as in function INTERN
  493.      (:export <symbol>...)
  494.                one or more symbols to be exported from this package,  as in
  495.                function EXPORT
  496.      returns   the new or redefined package
  497.  
  498. (delete-package <package>)                                 DELETE A PACKAGE
  499.      Deletes  a package  by uninterning  all its  symbols and  removing the
  500.      package.
  501.      <package> package to delete
  502.      returns   T if successful
  503.  
  504. (do-symbols (<var> [<package> [<result>]]) <expr>...)) ITERATE OVER SYMBOLS
  505. (do-external-symbols (<var> [<package> [<result>]]) <expr>...)
  506. (do-all-symbols (<var> [<result>]) <expr>...)
  507.      Implemented  as macros  in  common.lsp. DO-SYMBOLS  iterates over  all
  508.      symbols in  a single  package, DO-EXTERNAL-SYMBOLS iterates  only over
  509.      the  external symbols, and DO-ALL-SYMBOLS iterates over all symbols in
  510.      all packages.
  511.      <var>     variable to bind to symbol
  512.      <package> the package to search
  513.      <result>  a single result form
  514.      <expr>    expressions to evaluate (implicit tag-body)
  515.      returns   result of result form, or NIL if not specified
  516.  
  517. (export <symbols> [<package>])                     DECLARE EXTERNAL SYMBOLS
  518.      <symbols> symbols to declare as external
  519.      <package> package symbol is in
  520.      returns   T
  521.  
  522. (find-all-symbols <string>)                FIND SYMBOLS WITH SPECIFIED NAME
  523.      <string>  string or symbol (if latter, print name string is used)
  524.      returns   list of all symbols having that print-name
  525.  
  526. (find-package <package>)                   FIND PACKAGE WITH SPECIFIED NAME
  527.      <package> package to find
  528.      returns   package with name or nickname <package>, or NIL if not found
  529.  
  530. (find-symbol <string> [<package>])                         LOOK UP A SYMBOL
  531.      <string>  print name to search for
  532.      <package> package to search in
  533.      returns   two values, the first being the symbol, and the second being
  534.                :internal  if  the  symbol   is  internal  in  the  package,
  535.                :external  if  it  is  external,  or  :inherited  if  it  is
  536.                inherited via USE-PACKAGE. If the symbol was not found, then
  537.                both return values are NIL.
  538.  
  539. (import <symbols> [<package>])                IMPORT SYMBOLS INTO A PACKAGE
  540.      <symbols> symbols to import (fully qualified names)
  541.      <package> package to import symbols into
  542.      returns   T
  543.  
  544. (in-package <package>)                                  SET CURRENT PACKAGE
  545.      FSUBR which sets the current package until next call or end of current
  546.      LOAD.
  547.      <package> the package to enter
  548.      returns   the package
  549.  
  550. (list-all-packages)                                   GET ALL PACKAGE NAMES
  551.      returns   list of all currently existing packages
  552.  
  553. (make-package <package> &key :nicknames :use)            MAKE A NEW PACKAGE
  554.      <package> name of new package to create
  555.      :nicknames          list of package nicknames
  556.      :use      list of packages to use (as in USE-PACKAGE)
  557.      returns   the new package
  558.  
  559. (package-name <package>)                            GET PACKAGE NAME STRING
  560.      <package> package name
  561.      returns   package name string
  562.  
  563. (package-nicknames <package>)                  GET PACKAGE NICKNAME STRINGS
  564.      <package> package name
  565.      returns   list of package nickname strings
  566.  
  567. (package-obarray <package> [<external>])                     GET AN OBARRAY
  568.      <package> package to use
  569.      <external>          non-nil  for  external   obarray,  else   internal
  570.                          obarray (default)
  571.      returns   the obarray (array of lists of symbols in package)
  572.  
  573. (package-shadowing-symbols <package>)         GET LIST OF SHADOWING SYMBOLS
  574.      <package> the package
  575.      returns   list of shadowing symbols in package
  576.  
  577. (package-use-list <package>)                 GET PACKAGES USED BY A PACKAGE
  578.      <package> the package
  579.      returns   list of packages used by this package (as in USE-PACKAGE)
  580.  
  581. (package-used-by-list <package>)         GET PACKAGES THAT USE THIS PACKAGE
  582.      <package> the package
  583.      returns   list of packages that use this package (as in USE-PACKAGE)
  584.  
  585. (package-valid-p <package>)                         IS THIS A GOOD PACKAGE?
  586.      <package> object to check
  587.      returns   T if a valid package, else NIL
  588.  
  589. (rename-package <package> <new> [<nick>])                  RENAME A PACKAGE
  590.      <package> original package
  591.      <new>     new package name (may be same as original name)
  592.      <nick>    list of new package nicknames
  593.      returns   the new package
  594.  
  595. (shadow <symbols> [<package>])                       MAKE SHADOWING SYMBOLS
  596.      If a symbol is not already in  the package, it is interned. The symbol
  597.      is placed in the shadowing symbols list for the package.
  598.      <symbols> the symbol or symbols to shadow
  599.      <package> package to put symbols in
  600.      returns   T
  601.  
  602. (shadowing-import <symbols> [<package>])          IMPORT SYMBOLS AND SHADOW
  603.      If a  symbol exists in the package, it is first uninterned. The symbol
  604.      is imported, and then made shadowing.
  605.      <symbols> the symbol or symbols to import and shadow
  606.      <package> package to put symbols in
  607.      returns   T
  608.  
  609. (symbol-package <symbol>)                      FIND THE PACKAGE OF A SYMBOL
  610.      <symbol>  the symbol
  611.      returns   the home package of the symbol, or NIL if none
  612.  
  613. (unexport <symbols> [<package>])           MAKE SYMBOLS INTERNAL TO PACKAGE
  614.      <symbols> symbol or symbols to make internal
  615.      <package> package for symbols
  616.      returns   T
  617.  
  618. (unuse-package <pkgs> [<package>])            REMOVE PACKAGES FROM USE LIST
  619.      <pkgs>    A single package or list of packages
  620.      <package> Package  in which  to  un-use packages  (default is  current
  621.                package)
  622.      returns   T
  623.  
  624. (use-package <pkgs> [<package>])                   ADD PACKAGES TO USE LIST
  625.      <pkgs>    A single package or list of packages
  626.      <package> Package  in which  to  use packages  in (default  is current
  627.                package)
  628.      returns   T
  629.  
  630. (get <sym> <prop> [<dflt>])            GET THE VALUE OF A SYMBOL'S PROPERTY
  631.      Use SETF with GET to add or change properties.
  632.      <sym>     the symbol
  633.      <prop>    the property name
  634.      <dflt>    value to return if property not found, default is NIL
  635.      returns   the property value or <dflt> if property doesn't exist.
  636.  
  637. (getf <place> <prop> [<dflt>])                  GET THE VALUE OF A PROPERTY
  638.      Use SETF with GETF to add or change  properties. (NOTE--when used with
  639.      SETF,  <place> must  be a valid  place form.  It gets  executed twice,
  640.      contrary to Common Lisp standard.)
  641.      <place>   where the property list is stored
  642.      <prop>    the property name
  643.      <dflt>    value to return if property not found, default is NIL
  644.      returns   the property value or <dflt> if property doesn't exist.
  645.  
  646. (putprop <sym> <val> <prop>)            PUT A PROPERTY ONTO A PROPERTY LIST
  647.      Modern practice is to use (SETF (GET...)...) rather than PUTPROP.
  648.      <sym>     the symbol
  649.      <val>     the property value
  650.      <prop>    the property name
  651.      returns   the property value
  652.  
  653. (remf <place> <prop>)                                     DELETE A PROPERTY
  654.      Defined as a macro in COMMON.LSP
  655.      <place>   where the property list is stored
  656.      <prop>    the property name
  657.      returns   T if property existed, else NIL
  658.  
  659. (remprop <sym> <prop>)                           DELETE A SYMBOL'S PROPERTY
  660.      <sym>     the symbol
  661.      <prop>    the property name
  662.      returns   NIL
  663.  
  664. (make-hash-table &key :size :test)                        MAKE A HASH TABLE
  665.      :size     size  of hash table -- should  be a prime number. Default is
  666.                31.
  667.      :test     comparison function. Defaults to eql.
  668.      returns   the hash table
  669.  
  670. (gethash <key> <table> [<def>])                     EXTRACT FROM HASH TABLE
  671.      See also gethash in SETF.
  672.      <key>     hash key
  673.      <table>   hash table
  674.      <def>     value to return on no match (default is NIL)
  675.      returns   associated data, if found, or <def> if not found.
  676.  
  677. (remhash <key> <table>)                              DELETE FROM HASH TABLE
  678.      <key>     hash key
  679.      <table>   hash table
  680.      returns   T if deleted, NIL if not in table
  681.  
  682. (clrhash <table>)                                      CLEAR THE HASH TABLE
  683.      <table>   hash table
  684.      returns   NIL, all entries cleared from table
  685.  
  686. (hash-table-count <table>)                  NUMBER OF ENTRIES IN HASH TABLE
  687.      <table>   hash table
  688.      returns   integer number of entries in table
  689.  
  690. (maphash <fcn> <table>)                     MAP FUNCTION OVER TABLE ENTRIES
  691.      <fcn>     the function or function name, a function of two  arguments,
  692.                the first is  bound to the key, and the  second the value of
  693.                each table entry in turn.
  694.      <table>   hash table
  695.      returns   NIL
  696.  
  697. (aref <array> <n>)                          GET THE NTH ELEMENT OF AN ARRAY
  698.      See setf for setting elements of arrays
  699.      <array>   the array (or string)
  700.      <n>       the array index (integer, zero based)
  701.      returns   the value of the array element
  702.  
  703. (make-array <size> &key :initial-element :initial-contents)  MAKE A NEW ARRAY
  704.      <size>    the size of the new array (integer)
  705.      :initial-element
  706.                value to initialize all array elements, default NIL
  707.      :initial-contents
  708.                sequence used to initialize  all array elements, consecutive
  709.                sequence  elements  are used  for  each  array element.  The
  710.                length  of the sequence must be the  same as the size of the
  711.                array
  712.      returns   the new array
  713.  
  714. (vector <expr>...)                               MAKE AN INITIALIZED VECTOR
  715.      <expr>    the vector elements
  716.      returns   the new vector
  717.  
  718. (concatenate <type> <expr> ...)                       CONCATENATE SEQUENCES
  719.      If result type is string, sequences must contain only characters.
  720.      <type>    result type, one of CONS, LIST, ARRAY, or STRING
  721.      <expr>    zero or more sequences to concatenate
  722.      returns   a  sequence  which is  the  concatenation  of the  arguement
  723.                sequences
  724.  
  725. (elt <expr> <n>)                          GET THE NTH ELEMENT OF A SEQUENCE
  726.      <expr>    the sequence
  727.      <n>       the index of element to return
  728.      returns   the element if the index is in bounds, otherwise error
  729.  
  730. (map <type> <fcn> <expr> ...)         APPLY FUNCTION TO SUCCESSIVE ELEMENTS
  731. (map-into <target> <fcn> [<expr> ...])
  732.      <type>    result type, one of CONS, LIST, ARRAY, STRING, or NIL
  733.      <target>  destination sequence to modify
  734.      <fcn>     the function or function name
  735.      <expr>    a sequence for each argument of the function
  736.      returns   a  new sequence  of type  <type> for  MAP, and  <target> for
  737.                MAP-INTO.
  738.  
  739. (every <fcn> <expr> ...)             APPLY FUNCTION TO ELEMENTS UNTIL FALSE
  740. (notevery <fcn> <expr> ...)
  741.      <fcn>     the function or function name
  742.      <expr>    a sequence for each argument of the function
  743.      returns   every returns last evaluated function result
  744.                notevery returns T if  there is a NIL function  result, else
  745.                NIL
  746.  
  747. (some <fcn> <expr> ...)               APPLY FUNCTION TO ELEMENTS UNTIL TRUE
  748. (notany <fcn> <expr> ...)
  749.      <fcn>     the function or function name
  750.      <expr>    a sequence for each argument of the function
  751.      returns   some returns first non-NIL function result, or NIL
  752.                notany returns NIL  if there is  a non-NIL function  result,
  753.                else T
  754.  
  755. (length <expr>)                               FIND THE LENGTH OF A SEQUENCE
  756.      Note that a circular list causes  an error. To detect a circular list,
  757.      use LIST-LENGTH.
  758.      <expr>    the list, vector or string
  759.      returns   the length of the list, vector or string
  760.  
  761. (reverse <expr>)                                         REVERSE A SEQUENCE
  762. (nreverse <expr>)                          DESTRUCTIVELY REVERSE A SEQUENCE
  763.      <expr>    the sequence to reverse
  764.      returns   a new sequence in the reverse order
  765.  
  766. (subseq <seq> <start> [<end>])                        EXTRACT A SUBSEQUENCE
  767.      <seq>     the sequence
  768.      <start>   the starting position (zero origin)
  769.      <end>     the ending position + 1 (defaults to end) or NIL  for end of
  770.                sequence
  771.      returns   the sequence between <start> and <end>
  772.  
  773. (search  <seq1> <seq2>  &key  :test :test-not  :key  :start1 :end1  :start2
  774. :end2)
  775.                                                         SEARCH FOR SEQUENCE
  776.      <seq1>    the sequence to search for
  777.      <seq2>    the sequence to search in
  778.      :test     the test function (defaults to eql)
  779.      :test-not the test function (sense inverted)
  780.      :key      function to  apply to  test function arguments  (defaults to
  781.                identity)
  782.      :start1   starting index in <seq1>
  783.      :end1     index of end+1 in <seq1> or NIL for end of sequence
  784.      :start2   starting index in <seq2>
  785.      :end2     index of end+1 in <seq2> or NIL for end of sequence
  786.      returns   position of first match
  787.  
  788. (remove <expr> <seq> &key :test :test-not :key :start :end)
  789.                                             REMOVE ELEMENTS FROM A SEQUENCE
  790.      <expr>    the element to remove
  791.      <seq>     the sequence
  792.      :test     the test function (defaults to eql)
  793.      :test-not the test function (sense inverted)
  794.      :key      function  to  apply  to   test  function  sequence  argument
  795.                (defaults to identity)
  796.      :start    starting index
  797.      :end      index of end+1, or NIL for (length <seq>)
  798.      returns   copy of sequence with matching expressions removed
  799.  
  800. (remove-if <test> <seq> &key :key :start :end)
  801.                                              REMOVE ELEMENTS THAT PASS TEST
  802. (remove-if-not <test> <seq> &key :key :start :end)
  803.                                              REMOVE ELEMENTS THAT FAIL TEST
  804.      <test>    the test predicate
  805.      <seq>     the sequence
  806.      :key      function  to apply  to test  function argument  (defaults to
  807.                identity)
  808.      :start    starting index
  809.      :end      index of end+1, or NIL for (length <seq>)
  810.      returns   copy  of sequence  with  matching  or non-matching  elements
  811.                removed
  812.  
  813. (count <expr> <seq> &key :test :test-not :key :start :end)
  814.                                       COUNT MATCHING ELEMENTS IN A SEQUENCE
  815.      <expr>    element to count
  816.      <seq>     the sequence
  817.      :test     the test function (defaults to eql)
  818.      :test-not the test function (sense inverted)
  819.      :key      function  to  apply  to  each <seq>  argument  (defaults  to
  820.                identity)
  821.      :start    starting index
  822.      :end      index of end+1, or NIL for (length <seq>)
  823.      returns   count of matching elements
  824.  
  825. (count-if <test> <seq> &key :key :start :end)
  826.                                               COUNT ELEMENTS THAT PASS TEST
  827. (count-if-not <test> <seq> &key :key :start :end)
  828.                                               COUNT ELEMENTS THAT FAIL TEST
  829.      <test>    the test predicate
  830.      <seq>     the sequence
  831.      :key      function  to apply  to test  function argument  (defaults to
  832.                identity)
  833.      :start    starting index
  834.      :end      index of end+1, or NIL for (length <seq>)
  835.      returns   count of matching/non-matching elements
  836.  
  837. (find <expr> <seq> &key :test :test-not :key :start :end)
  838.                                     FIND FIRST MATCHING ELEMENT IN SEQUENCE
  839.      <expr>    element to search for
  840.      <seq>     the sequence
  841.      :test     the test function (defaults to eql)
  842.      :test-not the test function (sense inverted)
  843.      :key      function  to  apply  to  each <seq>  argument  (defaults  to
  844.                identity)
  845.      :start    starting index
  846.      :end      index of end+1, or NIL for (length <seq>)
  847.      returns   first matching element of sequence, or NIL
  848.  
  849. (find-if <test> <seq> &key :key :start :end)
  850.                                         FIND FIRST ELEMENT THAT PASSES TEST
  851. (find-if-not <test> <seq> &key :key :start :end)
  852.                                          FIND FIRST ELEMENT THAT FAILS TEST
  853.      <test>    the test predicate
  854.      <seq>     the sequence
  855.      :key      function  to apply  to test  function argument  (defaults to
  856.                identity)
  857.      :start    starting index
  858.      :end      index of end+1, or NIL for (length <seq>)
  859.      returns   first element of sequence that passes/fails test, or NIL
  860.  
  861. (position <expr> <seq> &key :test :test-not :key :start :end)
  862.                         FIND POSITION OF FIRST MATCHING ELEMENT IN SEQUENCE
  863.      <expr>    element to search for
  864.      <seq>     the sequence
  865.      :test     the test function (defaults to eql)
  866.      :test-not the test function (sense inverted)
  867.      :key      function  to  apply  to  each <seq>  argument  (defaults  to
  868.                identity)
  869.      :start    starting index
  870.      :end      index of end+1, or NIL for (length <seq>)
  871.      returns   position of first matching element of sequence, or NIL
  872.  
  873. (position-if <test> <seq> &key :key :start :end)
  874.                             FIND POSITION OF FIRST ELEMENT THAT PASSES TEST
  875. (position-if-not <test> <seq> &key :key :start :end)
  876.                          FIND POSITION OF FIRST ELEMENT THAT FAILS TEST
  877.      <test>    the test predicate
  878.      <seq>     the sequence
  879.      :key      function  to apply  to test  function argument  (defaults to
  880.                identity)
  881.      :start    starting index
  882.      :end      index of end+1, or NIL for (length <seq>)
  883.      returns   position  of first  element  of sequence  that  passes/fails
  884.                test, or NIL.
  885.  
  886. (delete <expr> <seq> &key :key :test :test-not :start :end)
  887.                                             DELETE ELEMENTS FROM A SEQUENCE
  888.      <expr>    the element to delete
  889.      <seq>     the sequence
  890.      :test     the test function (defaults to eql)
  891.      :test-not the test function (sense inverted)
  892.      :key      function   to  apply  to  test  function  sequence  argument
  893.                (defaults to identity)
  894.      :start    starting index
  895.      :end      index of end+1, or NIL for (length <seq>)
  896.      returns   the sequence with the matching expressions deleted
  897.  
  898. (delete-if <test> <seq> &key :key :start :end)
  899.                                              DELETE ELEMENTS THAT PASS TEST
  900. (delete-if-not <test> <seq> &key :key :start :end)
  901.                                              DELETE ELEMENTS THAT FAIL TEST
  902.      <test>    the test predicate
  903.      <seq>     the sequence
  904.      :key      function  to apply  to test  function argument  (defaults to
  905.                identity)
  906.      :start    starting index
  907.      :end      index of end+1, or NIL for (length <seq>)
  908.      returns   the sequence with matching or non-matching elements deleted
  909.  
  910. (reduce <fcn> <seq> &key :initial-value :start :end)
  911.                                             REDUCE SEQUENCE TO SINGLE VALUE
  912.      <fcn>     function (of two  arguments) to apply to  result of previous
  913.                function application  (or first element) and  each member of
  914.                sequence.
  915.      <seq>     the sequence
  916.      :initial-value      value to  use as first argument  in first function
  917.                          application rather than using the first element of
  918.                          the sequence.
  919.      :start    starting index
  920.      :end      index of end+1, or NIL for (length <seq>)
  921.      returns   if  sequence is empty and there is no initial value, returns
  922.                result of applying function to zero  arguements. If there is
  923.                a single element, returns the element. Otherwise returns the
  924.                result of the last function application.
  925.  
  926. (remove-duplicates <seq> &key :test :test-not :key :start :end)
  927.                                             REMOVE DUPLICATES FROM SEQUENCE
  928.      <seq>     the sequence
  929.      :test     comparison function (default eql)
  930.      :test-not comparison function (sense inverted)
  931.      :key      function to  apply to  test function arguments  (defaults to
  932.                identity)
  933.      :start    starting index
  934.      :end      index of end+1, or NIL for (length <seq>)
  935.      returns   copy of sequence with duplicates removed.
  936.  
  937. (fill <seq> <expr> &key :start :end)              REPLACE ITEMS IN SEQUENCE
  938.      Defined in common.lsp
  939.      <seq>     the sequence
  940.      <expr>    new value to place in sequence
  941.      :start    starting index
  942.      :end      index of end+1, or NIL for (length <seq>)
  943.      returns   sequence with items replaced with new item
  944.  
  945. (replace <seq1> <seq2> &key :start1 :end1 :start2 :end2)
  946.                                     REPLACE ITEMS IN SEQUENCE FROM SEQUENCE
  947.      Defined in common.lsp
  948.      <seq1>    the sequence to modify
  949.      <seq2>    sequence with new items
  950.      :start1   starting index in <seq1>
  951.      :end1     index of end+1 in <seq1> or NIL for end of sequence
  952.      :start2   starting index in <seq2>
  953.      :end2     index of end+1 in <seq2> or NIL for end of sequence
  954.      returns   first sequence with items replaced
  955.  
  956. (car <expr>)                                  RETURN THE CAR OF A LIST NODE
  957. (first <expr>)                                            A SYNONYM FOR CAR
  958.      <expr>    the list node
  959.      returns   the car of the list node
  960.  
  961. (cdr <expr>)                                  RETURN THE CDR OF A LIST NODE
  962. (rest <expr>)                                             A SYNONYM FOR CDR
  963.      <expr>    the list node
  964.      returns   the cdr of the list node
  965.  
  966. (caar <expr>)                      NESTED CAR/CDR EXPRESSIONS
  967. (cadr <expr>)
  968. (cdar <expr>)
  969. (cddr <expr>)
  970. (caaar <expr>)
  971. (caadr <expr>)
  972. (cadar <expr>)
  973. (caddr <expr>)
  974. (cdaar <expr>)
  975. (cdadr <expr>)
  976. (cddar <expr>)
  977. (cdddr <expr>)
  978. (caaaar <expr>)
  979. (caaadr <expr>)
  980. (caadar <expr>)
  981. (caaddr <expr>)
  982. (cadaar <expr>)
  983. (cadadr <expr>)
  984. (caddar <expr>)
  985. (cadddr <expr>)
  986. (cdaaar <expr>)
  987. (cdaadr <expr>)
  988. (cdadar <expr>)
  989. (cdaddr <expr>)
  990. (cddaar <expr>)
  991. (cddadr <expr>)
  992. (cdddar <expr>)
  993. (cddddr <expr>)
  994. (second <expr>)                                          A SYNONYM FOR CADR
  995. (third <expr>)                                          A SYNONYM FOR CADDR
  996. (fourth <expr>)                                        A SYNONYM FOR CADDDR
  997.     Applied from right to left: cadr means take the cdr then take the car.
  998.  
  999. (cons <expr1> <expr2>)                            CONSTRUCT A NEW LIST NODE
  1000.      <expr1>   the car of the new list node
  1001.      <expr2>   the cdr of the new list node
  1002.      returns   the new list node
  1003.  
  1004. (acons <expr1> <expr2> <alist>)                  ADD TO FRONT OF ASSOC LIST
  1005.      defined in common.lsp
  1006.      <expr1>   key of new association
  1007.      <expr2>   value of new association
  1008.      <alist>   association list
  1009.      returns   new association list, which  is (cons (cons <expr1> <expr2>)
  1010.                <expr3>))
  1011.  
  1012. (list <expr>...)                                    CREATE A LIST OF VALUES
  1013. (list* <expr> ... <list>)
  1014.      <expr>    expressions to be combined into a list
  1015.      returns   the new list
  1016.  
  1017. (append <expr>...)                                             APPEND LISTS
  1018.      <expr>    lists whose elements are to be appended
  1019.      returns   the new list
  1020.  
  1021. (list-length <list>)                              FIND THE LENGTH OF A LIST
  1022.      <list>    the list
  1023.      returns   the length of the list or NIL if the list is circular
  1024.  
  1025. (last <list>)                           RETURN THE LAST LIST NODE OF A LIST
  1026.      <list>    the list
  1027.      returns   the last list node in the list
  1028.  
  1029. (butlast <list> [<n>])                  RETURN COPY OF ALL BUT LAST OF LIST
  1030.      <list>    the list
  1031.      <n>       count of elements to omit (default 1)
  1032.      returns   copy of list with last element(s) absent.
  1033.  
  1034. (nth <n> <list>)                           RETURN THE NTH ELEMENT OF A LIST
  1035.      <n>       the number of the element to return (zero origin)
  1036.      <list>    the list
  1037.      returns   the nth element or NIL if the list isn't that long
  1038.  
  1039. (nthcdr <n> <list>)                            RETURN THE NTH CDR OF A LIST
  1040.      <n>       the number of the element to return (zero origin)
  1041.      <list>    the list
  1042.      returns   the nth cdr or NIL if the list isn't that long
  1043.  
  1044. (member <expr> <list> &key :test :test-not :key)
  1045.                                                FIND AN EXPRESSION IN A LIST
  1046.      <expr>    the expression to find
  1047.      <list>    the list to search
  1048.      :test     the test function (defaults to eql)
  1049.      :test-not the test function (sense inverted)
  1050.      :key      function to  apply to test function  list argument (defaults
  1051.                to identity)
  1052.      returns   the remainder of the list starting with the expression
  1053.  
  1054. (assoc <expr> <alist> &key :test :test-not :key)
  1055.                                             FIND AN EXPRESSION IN AN A-LIST
  1056.      <expr>    the expression to find
  1057.      <alist>   the association list
  1058.      :test     the test function (defaults to eql)
  1059.      :test-not the test function (sense inverted)
  1060.      :key      function to  apply to test function  list argument (defaults
  1061.                to identity)
  1062.      returns   the alist entry or NIL
  1063.  
  1064. (mapc <fcn> <list1> <list>...)            APPLY FUNCTION TO SUCCESSIVE CARS
  1065.      <fcn>     the function or function name
  1066.      <listn>   a list for each argument of the function
  1067.      returns   the first list of arguments
  1068.  
  1069. (mapcar <fcn> <list1> <list>...)          APPLY FUNCTION TO SUCCESSIVE CARS
  1070.      <fcn>     the function or function name
  1071.      <listn>   a list for each argument of the function
  1072.      returns   a list of the values returned
  1073.  
  1074. (mapl <fcn> <list1> <list>...)            APPLY FUNCTION TO SUCCESSIVE CDRS
  1075.      <fcn>     the function or function name
  1076.      <listn>   a list for each argument of the function
  1077.      returns   the first list of arguments
  1078.  
  1079. (maplist <fcn> <list1> <list>...)         APPLY FUNCTION TO SUCCESSIVE CDRS
  1080.      <fcn>     the function or function name
  1081.      <listn>   a list for each argument of the function
  1082.      returns   a list of the values returned
  1083.  
  1084. (mapcan <fcn> <list1> <list>...)           APPL FUNCTION TO SUCCESSIVE CARS
  1085.      <fcn>     the function or function name
  1086.      <listn>   a list for each argument of the function
  1087.      returns   list of return values nconc'd together
  1088.  
  1089. (mapcon <fcn> <list1> <list>...)           APPL FUNCTION TO SUCCESSIVE CDRS
  1090.      <fcn>     the function or function name
  1091.      <listn>   a list for each argument of the function
  1092.      returns   list of return values nconc'd together
  1093.  
  1094. (subst <to> <from> <expr> &key :test :test-not :key)
  1095. (nsubst <to> <from> <expr> &key :test :test-not :key)
  1096.                                                      SUBSTITUTE EXPRESSIONS
  1097.      SUBST does minimum  copying as required by Common Lisp.  NSUBST is the
  1098.      destructive version.
  1099.      <to>      the new expression
  1100.      <from>    the old expression
  1101.      <expr>    the expression in which to do the substitutions
  1102.      :test     the test function (defaults to eql)
  1103.      :test-not the test function (sense inverted)
  1104.      :key      function  to  apply  to  subtree  test  function  expression
  1105.                argument (defaults to identity)
  1106.      returns   the expression with substitutions
  1107.  
  1108. (sublis <alist> <expr> &key :test :test-not :key)
  1109. (nsublis <alist> <expr> &key :test :test-not :key)
  1110.                                                   SUBSTITUTE WITH AN A-LIST
  1111.      SUBLIS does minimum copying as required by Common Lisp. NSUBLIS is the
  1112.      destructive version.
  1113.      <alist>   the association list
  1114.      <expr>    the expression in which to do the substitutions
  1115.      :test     the test function (defaults to eql)
  1116.      :test-not the test function (sense inverted)
  1117.      :key      function  to  apply  to  subtree  test  function  expression
  1118.                argument (defaults to identity)
  1119.      returns   the expression with substitutions
  1120.  
  1121. (pairlis <keys> <values> [<alist>])          BUILD AN A-LIST FROM TWO LISTS
  1122.      In file common.lsp
  1123.      <keys>    list of association keys
  1124.      <values>  list of association values, same length as keys
  1125.      <alist>   existing association list, default NIL
  1126.      returns   new association list
  1127.  
  1128. (copy-list <list>)                             COPY THE TOP LEVEL OF A LIST
  1129.      In file common.lsp
  1130.      <list>    the list
  1131.      returns   a copy of the list (new cons cells in top level)
  1132.  
  1133. (copy-alist <alist>)                               COPY AN ASSOCIATION LIST
  1134.      In file common.lsp
  1135.      <alist>   the association list
  1136.      returns   a copy of the association list (keys and values not copies)
  1137.  
  1138. (copy-tree <tree>)                                              COPY A TREE
  1139.      In file common.lsp
  1140.      <tree>    a tree structure of cons cells
  1141.      returns   a copy of the tree structure
  1142.  
  1143. (intersection <list1> <list2> &key :test :test-not :key)      SET FUNCTIONS
  1144. (union <list1> <list2> &key :test :test-not :key)
  1145. (set-difference <list1> <list2> &key :test :test-not :key)
  1146. (set-exclusive-or <list1> <list2> &key :test :test-not :key)
  1147. (nintersection <list1> <list2> &key :test :test-not :key)
  1148. (nunion <list1> <list2> &key :test :test-not :key)
  1149. (nset-difference <list1> <list2> &key :test :test-not :key)
  1150. (nset-exclusive-or <list1> <list2> &key :test :test-not :key)
  1151.      set-exclusive-or and nset-exclusive-or defined in  common.lsp. nunion,
  1152.      nintersection,    and   nset-difference    are   aliased    to   their
  1153.      non-destructive counterparts in common.lsp.
  1154.      <list1>   first list
  1155.      <list2>   second list
  1156.      :test     the test function (defaults to eql)
  1157.      :test-not the test function (sense inverted)
  1158.      :key      function to  apply to  test function arguments  (defaults to
  1159.                identity)
  1160.      returns   intersection: list of all elements in both lists
  1161.                union: list of all elements in either list
  1162.                set-diference: list of all elements in first list but not in
  1163.                second list
  1164.                set-exclusive-or: list of all elements in only one list
  1165.                "n" versions are potentially destructive.
  1166.  
  1167. (adjoin <expr> <list> :test :test-not :key)              ADD UNIQUE TO LIST
  1168.      <expr>    new element to add
  1169.      <list>    the list
  1170.      :test     the test function (defaults to eql)
  1171.      :test-not the test function <sense inverted)
  1172.      :key      function to  apply to  test function arguments  (defaults to
  1173.                identity)
  1174.      returns   if  element not  in  list then  (cons  <expr> <list>),  else
  1175.                <list>.
  1176.  
  1177. (rplaca <list> <expr>)                       REPLACE THE CAR OF A LIST NODE
  1178.      <list>    the list node
  1179.      <expr>    the new value for the car of the list node
  1180.      returns   the list node after updating the car
  1181.  
  1182. (rplacd <list> <expr>)                       REPLACE THE CDR OF A LIST NODE
  1183.      <list>    the list node
  1184.      <expr>    the new value for the cdr of the list node
  1185.      returns   the list node after updating the cdr
  1186.  
  1187. (nconc <list>...)                           DESTRUCTIVELY CONCATENATE LISTS
  1188.      <list>    lists to concatenate
  1189.      returns   the result of concatenating the lists
  1190.  
  1191. (sort <seq> <test> &key :key)                 DESTRUCTIVELY SORT A SEQUENCE
  1192.      <seq>     the sequence to sort
  1193.      <test>    the comparison function
  1194.      :key      function to apply to comparison function arguments (defaults
  1195.                to identity)
  1196.      returns   the sorted sequence
  1197.  
  1198. (nsubst-if <to> <test> <expr> &key :key)
  1199. (nsubst-if-not <to> <test> <expr> &key :key)
  1200.                                                      SUBSTITUTE EXPRESSIONS
  1201.      <to>      the new expression
  1202.      <test>    function of one argument to test each subtree
  1203.      <expr>    the expression in which to do the substitutions
  1204.      :key      function  to apply  to test  function argument  (defaults to
  1205.                identity)
  1206.      returns   the expression with substitutions
  1207.  
  1208. (truncate <expr> <denom>)                             TRUNCATES TOWARD ZERO
  1209. (round <expr> <denom>)                   ROUNDS TOWARD NEAREST EVEN INTEGER
  1210. (floor <expr> <denom>)                   TRUNCATES TOWARD NEGATIVE INFINITY
  1211. (ceiling <expr> <denom>)                          TRUNCATES TOWARD INFINITY
  1212.      Round,  floor, and ceiling, and  the second argument  of truncate, are
  1213.      part  of the  math extension.  Results too  big to  be represented  as
  1214.      integers are returned  as floating point numbers  as part of the  math
  1215.      extension. Integers are returned as is.
  1216.      <expr>    the real number
  1217.      <denom>   real number to divide <expr> by before converting
  1218.      returns   the integer  result  of converting  the  number, and,  as  a
  1219.                second return value, the remainder of the operation, defined
  1220.                as expr - result*denom. the type is float if either argument
  1221.                is float, otherwise it is rational.
  1222.  
  1223. (float <expr>)               CONVERTS AN INTEGER TO A FLOATING POINT NUMBER
  1224.      <expr>    the real number
  1225.      returns   the number as a floating point number
  1226.  
  1227. (rational <expr>)                      CONVERTS A REAL NUMBER TO A RATIONAL
  1228.      Floating  point numbers too large to express return the floating point
  1229.      number,  while numbers  too  small to  express  return zero.  Rational
  1230.      numbers are returned as is.
  1231.      <expr>    the real number
  1232.      returns   the number as a ratio or integer. 
  1233.  
  1234. (+ [<expr>...])                                       ADD A LIST OF NUMBERS
  1235.      With no arguments returns addition identity, 0 (integer)
  1236.      <expr>    the numbers
  1237.      returns   the result of the addition
  1238.  
  1239. (- <expr>...)          SUBTRACT A LIST OF NUMBERS OR NEGATE A SINGLE NUMBER
  1240.      <expr>    the numbers
  1241.      returns   the result of the subtraction
  1242.  
  1243. (* [<expr>...])                                  MULTIPLY A LIST OF NUMBERS
  1244.      With no arguments returns multiplication identity, 1
  1245.      <expr>    the numbers
  1246.      returns   the result of the multiplication
  1247.  
  1248. (/ <expr>...)            DIVIDE A LIST OF NUMBERS OR INVERT A SINGLE NUMBER
  1249.      With  the math  extension, division  of integer  numbers results  in a
  1250.      rational quotient,  rather than integer. To  perform integer division,
  1251.      use TRUNCATE.  When an integer complex  is divided by  an integer, the
  1252.      quotient is floating point complex.
  1253.      <expr>    the numbers
  1254.      returns   the result of the division
  1255.  
  1256. (1+ <expr>)                                             ADD ONE TO A NUMBER
  1257.      <expr>    the number
  1258.      returns   the number plus one
  1259.  
  1260. (1- <expr>)                                      SUBTRACT ONE FROM A NUMBER
  1261.      <expr>    the number
  1262.      returns   the number minus one
  1263.  
  1264. (rem <expr>...)                              REMAINDER OF A LIST OF NUMBERS
  1265.      With the math extension, only two arguments allowed.
  1266.      <expr>    the real numbers (must be integers, without math extension)
  1267.      returns   the  result  of  the  remainder  operation  (remainder  with
  1268.                truncating division)
  1269.  
  1270. (mod <expr1> <expr2>)                          NUMBER MODULO ANOTHER NUMBER
  1271.      Part of math extension.
  1272.      <expr1>   real number
  1273.      <expr2>   real number divisor (may not be zero)
  1274.      returns   the  remainder  after  dividing  <expr1>  by  <expr2>  using
  1275.                flooring  division, thus  there is  no discontinuity  in the
  1276.                function around zero.
  1277.  
  1278. (min <expr>...)                           THE SMALLEST OF A LIST OF NUMBERS
  1279.      <expr>    the real numbers
  1280.      returns   the smallest number in the list
  1281.  
  1282. (max <expr>...)                            THE LARGEST OF A LIST OF NUMBERS
  1283.      <expr>    the real numbers
  1284.      returns   the largest number in the list
  1285.  
  1286. (abs <expr>)                                 THE ABSOLUTE VALUE OF A NUMBER
  1287.      <expr>    the number
  1288.      returns   the  absolute value  of  the number,  which is  the floating
  1289.                point magnitude for complex numbers.
  1290.  
  1291. (signum <expr>)                                    GET THE SIGN OF A NUMBER
  1292.      Defined in common.lsp
  1293.      <expr>    the number
  1294.      returns   zero if number is zero, one  if positive, or negative one if
  1295.                negative.  Numeric type  is  same as  number. For  a complex
  1296.                number, returns unit magnitude but same phase as number.
  1297.  
  1298. (gcd [<n>...])                          COMPUTE THE GREATEST COMMON DIVISOR
  1299.      With no arguments returns 0, with one argument returns the argument.
  1300.      <n>       The number(s) (integer)
  1301.      returns   the greatest common divisor
  1302.  
  1303. (lcm <n>...)                              COMPUTE THE LEAST COMMON MULTIPLE
  1304.      Part  of  math extension.  A result  which  would be  larger  than the
  1305.      largest integer causes an error.
  1306.      <n>       The number(s) (integer)
  1307.      returns   the least common multiple
  1308.  
  1309. (random <n> [<state>])                       COMPUTE A PSEUDO-RANDOM NUMBER
  1310.      <n>       the real number upper bound
  1311.      <state>   a random-state (default is *random-state*)
  1312.      returns   a random number in range [0,n)
  1313.  
  1314. (make-random-state [<state>])                         CREATE A RANDOM-STATE
  1315.      <state>   a  random-state,   t,  or  NIL  (default   NIL).  NIL  means
  1316.                *random-state*
  1317.      returns   If  <state> is t, a random random-state, otherwise a copy of
  1318.                <state>
  1319.  
  1320. (sin <expr>)                                   COMPUTE THE SINE OF A NUMBER
  1321. (cos <expr>)                                 COMPUTE THE COSINE OF A NUMBER
  1322. (tan <expr>)                                COMPUTE THE TANGENT OF A NUMBER
  1323. (asin <expr>)                              COMPUTE THE ARC SINE OF A NUMBER
  1324. (acos <expr>)                            COMPUTE THE ARC COSINE OF A NUMBER
  1325.      <expr>    the floating point number
  1326.      returns   the  sine, cosine, tangent, arc  sine, or arc  cosine of the
  1327.                number
  1328.  
  1329. (atan <expr> [<expr2>])                 COMPUTE THE ARC TANGENT OF A NUMBER
  1330.      <expr>    the floating point number (numerator)
  1331.      <expr2>   the denominator,  default 1. May  only be specified  if math
  1332.                extension installed
  1333.      returns   the arc tangent of <expr>/<expr2>
  1334.  
  1335. (sinh <expr>)                       COMPUTE THE HYPERBOLIC SINE OF A NUMBER
  1336. (cosh <expr>)                     COMPUTE THE HYPERBOLIC COSINE OF A NUMBER
  1337. (tanh <expr>)                    COMPUTE THE HYPERBOLIC TANGENT OF A NUMBER
  1338. (asinh <expr>)                  COMPUTE THE HYPERBOLIC ARC SINE OF A NUMBER
  1339. (acosh <expr>)                COMPUTE THE HYPERBOLIC ARC COSINE OF A NUMBER
  1340. (atanh <expr>)               COMPUTE THE HYPERBOLIC ARC TANGENT OF A NUMBER
  1341.      Defined in common.lsp
  1342.      <expr>    the number
  1343.      returns   the hyperbolic sine, cosine,  tangent, arc sine, arc cosine,
  1344.                or arc tangent of the number.
  1345.  
  1346. (expt <x-expr> <y-expr>)                           COMPUTE X TO THE Y POWER
  1347.      <x-expr>  the number 
  1348.      <y-expr>  the exponent 
  1349.      returns   x to the y power. If y is a fixnum, then  the result type is
  1350.                the same  as the type  of x, unless  fixnum or ratio  and it
  1351.                would overflow, then the result type is a flonum.
  1352.  
  1353. (exp <x-expr>)                                     COMPUTE E TO THE X POWER
  1354.      <x-expr>  the floating point number 
  1355.      returns   e to the x power
  1356.  
  1357. (cis <x-expr>)                                      COMPUTE COSINE + I SINE
  1358.      Defined in common.lsp
  1359.      <x-expr>  the number
  1360.      returns   e to the ix power
  1361.  
  1362. (log <expr> [<base>])                                  COMPUTE THE LOGRITHM
  1363.      Part of the math extension
  1364.      <expr>    the number
  1365.      <base>    the base, default is e
  1366.      returns   log base <base> of <expr>
  1367.  
  1368. (sqrt <expr>)                           COMPUTE THE SQUARE ROOT OF A NUMBER
  1369.      <expr>    the number 
  1370.      returns   the square root of the number
  1371.  
  1372. (numerator <expr>)                            GET THE NUMERATOR OF A NUMBER
  1373.      Part of math extension
  1374.      <expr>    rational number
  1375.      returns   numerator of number (number if integer)
  1376.  
  1377. (denominator <expr>)                        GET THE DENOMINATOR OF A NUMBER
  1378.      Part of math extension
  1379.      <expr>    rational number
  1380.      returns   denominator of number (1 if integer)
  1381.  
  1382. (complex <real> [<imag>])                         CONVERT TO COMPLEX NUMBER
  1383.      Part of math extension
  1384.      <real>    real number real part
  1385.      <imag>    real number imaginary part (default 0)
  1386.      returns   the complex number
  1387.  
  1388. (realpart <expr>)                             GET THE REAL PART OF A NUMBER
  1389.      Part of the math extension
  1390.      <expr>    the number
  1391.      returns   the real part of a complex number, or the number itself if a
  1392.      real number
  1393.  
  1394. (imagpart <expr>)                        GET THE IMAGINARY PART OF A NUMBER
  1395.      Part of the math extension
  1396.      <expr>    the number
  1397.      returns   the imaginary part  of a complex number, or zero of the type
  1398.                of the number if a real number.
  1399.  
  1400. (conjugate <expr>)                            GET THE CONJUGATE OF A NUMBER
  1401.      Part of the math extension
  1402.      <expr>    the number
  1403.      returns   the conjugate of a complex number, or the number itself if a
  1404.      real number.
  1405.  
  1406. (phase <expr>)                                    GET THE PHASE OF A NUMBER
  1407.      Part of the math extension
  1408.      <expr>    the number
  1409.      returns   the  phase  angle,  equivalent to  (atan  (imagpart  <expr>)
  1410.                (realpart <expr>))
  1411.  
  1412. (< <n1> <n2>...)                                         TEST FOR LESS THAN
  1413. (<= <n1> <n2>...)                            TEST FOR LESS THAN OR EQUAL TO
  1414. (= <n1> <n2>...)                                          TEST FOR EQUAL TO
  1415. (/= <n1> <n2>...)                                     TEST FOR NOT EQUAL TO
  1416. (>= <n1> <n2>...)                         TEST FOR GREATER THAN OR EQUAL TO
  1417. (> <n1> <n2>...)                                      TEST FOR GREATER THAN
  1418.      <n1>      the first real number to compare
  1419.      <n2>      the second real number to compare
  1420.      returns   the result of comparing <n1> with <n2>...
  1421.  
  1422. (logand [<expr>...])                  THE BITWISE AND OF A LIST OF INTEGERS
  1423.      With no arguments returns identity -1
  1424.      <expr>    the integers
  1425.      returns   the result of the and operation
  1426.  
  1427. (logior [<expr>...])         THE BITWISE INCLUSIVE OR OF A LIST OF INTEGERS
  1428.      With no arguments returns identity 0
  1429.      <expr>    the integers
  1430.      returns   the result of the inclusive or operation
  1431.  
  1432. (logxor [<expr>...])         THE BITWISE EXCLUSIVE OR OF A LIST OF INTEGERS
  1433.      With no arguments returns identity 0
  1434.      <expr>    the integers
  1435.      returns   the result of the exclusive or operation
  1436.  
  1437. (lognot <expr>)                                THE BITWISE NOT OF A INTEGER
  1438.      <expr>    the integer
  1439.      returns   the bitwise inversion of integer
  1440.  
  1441. (logtest <expr1> <expr2>)                  TEST BITWISE AND OF TWO INTEGERS
  1442.      Defined in common.lsp
  1443.      <expr1>   the first integer
  1444.      <expr2>   the second integer
  1445.      returns   T if the result of the and operation is non-zero, else NIL
  1446.  
  1447. (ash <expr1> <expr2>)                                      ARITHMETIC SHIFT
  1448.      Part of math extension
  1449.      <expr1>   integer to shift
  1450.      <expr2>   number of bit positions to shift (positive is to left)
  1451.      returns   shifted integer
  1452.  
  1453. (string <expr>)                   MAKE A STRING FROM AN INTEGER ASCII VALUE
  1454.      <expr>    an  integer  (which  is   first  converted  into  its  ASCII
  1455.                character value), string, character, or symbol
  1456.      returns   the string representation of the argument
  1457.  
  1458. (string-trim <bag> <str>)                        TRIM BOTH ENDS OF A STRING
  1459.      <bag>     a string containing characters to trim
  1460.      <str>     the string to trim
  1461.      returns   a trimed copy of the string
  1462.  
  1463. (string-left-trim <bag> <str>)                TRIM THE LEFT END OF A STRING
  1464.      <bag>     a string containing characters to trim
  1465.      <str>     the string to trim
  1466.      returns   a trimed copy of the string
  1467.  
  1468. (string-right-trim <bag> <str>)              TRIM THE RIGHT END OF A STRING
  1469.      <bag>     a string containing characters to trim
  1470.      <str>     the string to trim
  1471.      returns   a trimed copy of the string
  1472.  
  1473. (string-upcase <str> &key :start :end)                 CONVERT TO UPPERCASE
  1474.      <str>     the string
  1475.      :start    the starting offset
  1476.      :end      the ending offset + 1 or NIL for end of string
  1477.      returns   a converted copy of the string
  1478.  
  1479. (string-downcase <str> &key :start :end)               CONVERT TO LOWERCASE
  1480.      <str>     the string
  1481.      :start    the starting offset
  1482.      :end      the ending offset + 1 or NIL for end of string
  1483.      returns   a converted copy of the string
  1484.  
  1485. (string-capitalize <str> &key :start :end)                CAPITALIZE STRING
  1486.      <str>     the string
  1487.      :start    the starting offset
  1488.      :end      the ending offset + 1 or NIL for end of string
  1489.      returns   a  converted copy  of the  string with  each word  having an
  1490.                initial uppercase letter and following lowercase letters
  1491.  
  1492. (nstring-upcase <str> &key :start :end)                CONVERT TO UPPERCASE
  1493.      <str>     the string
  1494.      :start    the starting offset
  1495.      :end      the ending offset + 1 or NIL for end of string
  1496.      returns   the converted string (not a copy)
  1497.  
  1498. (nstring-downcase <str> &key :start :end)              CONVERT TO LOWERCASE
  1499.      <str>     the string
  1500.      :start    the starting offset
  1501.      :end      the ending offset + 1 or NIL for end of string
  1502.      returns   the converted string (not a copy)
  1503.  
  1504. (nstring-capitalize <str> &key :start :end)               CAPITALIZE STRING
  1505.      <str>     the string
  1506.      :start    the starting offset
  1507.      :end      the ending offset + 1 or NIL for end of string
  1508.      returns   the string with each word having an initial uppercase letter
  1509.                and following lowercase letters (not a copy)
  1510.  
  1511. (strcat <expr>...)                                      CONCATENATE STRINGS
  1512.      Macro in init.lsp, to maintain compatibility with XLISP.
  1513.      See CONCATENATE for preferred function.
  1514.      <expr>    the strings to concatenate
  1515.      returns   the result of concatenating the strings
  1516.  
  1517. (string< <str1> <str2> &key :start1 :end1 :start2 :end2)
  1518. (string<= <str1> <str2> &key :start1 :end1 :start2 :end2)
  1519. (string= <str1> <str2> &key :start1 :end1 :start2 :end2)
  1520. (string/= <str1> <str2> &key :start1 :end1 :start2 :end2)
  1521. (string>= <str1> <str2> &key :start1 :end1 :start2 :end2)
  1522. (string> <str1> <str2> &key :start1 :end1 :start2 :end2)
  1523.      <str1>    the first string to compare
  1524.      <str2>    the second string to compare
  1525.      :start1   first substring starting offset
  1526.      :end1     first substring ending offset + 1 or NIL for end of string
  1527.      :start2   second substring starting offset
  1528.      :end2     second substring ending offset + 1 or NIL for end of string
  1529.      returns   string=: t if predicate is true, NIL otherwise
  1530.                others: If predicate is true then number of initial matching
  1531.                characters, else NIL
  1532.      Note: case is significant with these comparison functions.
  1533.  
  1534. (string-lessp <str1> <str2> &key :start1 :end1 :start2 :end2)
  1535. (string-not-greaterp <str1> <str2> &key :start1 :end1 :start2 :end2)
  1536. (string-equal <str1> <str2> &key :start1 :end1 :start2 :end2)
  1537. (string-not-equal <str1> <str2> &key :start1 :end1 :start2 :end2)
  1538. (string-not-lessp <str1> <str2> &key :start1 :end1 :start2 :end2)
  1539. (string-greaterp <str1> <str2> &key :start1 :end1 :start2 :end2)
  1540.      <str1>    the first string to compare
  1541.      <str2>    the second string to compare
  1542.      :start1   first substring starting offset
  1543.      :end1     first substring ending offset + 1 or NIL for end of string
  1544.      :start2   second substring starting offset
  1545.      :end2     second substring ending offset + 1 or NIL for end of string
  1546.      returns   string-equal: t if predicate is true, NIL otherwise
  1547.                others: If predicate is true then number of initial matching
  1548.                characters, else NIL
  1549.      Note: case is not  significant with these comparison functions  -- all
  1550.      uppercase characters are converted to lowercase before being compared.
  1551.  
  1552. (char <string> <index>)                   EXTRACT A CHARACTER FROM A STRING
  1553.      <string>  the string
  1554.      <index>   the string index (zero relative)
  1555.      returns   the ascii code of the character
  1556.  
  1557. (alphanumericp <chr>)                       IS THIS CHARACTER ALPHANUMERIC?
  1558.      <chr>     the character
  1559.      returns   true  if  the  character   is  alphabetic  or  numeric,  NIL
  1560.                otherwise
  1561.  
  1562. (upper-case-p <chr>)                       IS THIS AN UPPER CASE CHARACTER?
  1563.      <chr>     the character
  1564.      returns   true if the character is upper case, NIL otherwise
  1565.  
  1566. (lower-case-p <chr>)                        IS THIS A LOWER CASE CHARACTER?
  1567.      <chr>     the character
  1568.      returns   true if the character is lower case, NIL otherwise
  1569.  
  1570. (alpha-char-p <chr>)                       IS THIS AN ALPHABETIC CHARACTER?
  1571.      <chr>     the character
  1572.      returns   true if the character is alphabetic, NIL otherwise
  1573.  
  1574. (both-case-p <chr>)          IS THIS AN ALPHABETIC (EITHER CASE) CHARACTER?
  1575.      <chr>     the character
  1576.      returns   true  if the  character  is  available  in both  cases,  NIL
  1577.                otherwise
  1578.  
  1579. (digit-char-p <chr>)                             IS THIS A DIGIT CHARACTER?
  1580.      <chr>     the character
  1581.      returns   the digit weight if character is a digit, NIL otherwise
  1582.  
  1583. (char-code <chr>)                         GET THE ASCII CODE OF A CHARACTER
  1584.      <chr>     the character
  1585.      returns   the ASCII character code (integer, parity bit stripped)
  1586.  
  1587. (code-char <code>)             GET THE CHARACTER WITH A SPECFIED ASCII CODE
  1588.      <code>    the ASCII code (integer, range 0-127)
  1589.      returns   the character with that code or NIL
  1590.  
  1591. (char-upcase <chr>)                       CONVERT A CHARACTER TO UPPER CASE
  1592.      <chr>     the character
  1593.      returns   the upper  case  version of  the character,  if one  exists,
  1594.                otherwise returns the character
  1595.  
  1596. (char-downcase <chr>)                     CONVERT A CHARACTER TO LOWER CASE
  1597.      <chr>     the character
  1598.      returns   the  lower case  version  of the  character, if  one exists,
  1599.                otherwise returns the character
  1600.  
  1601. (digit-char <n>)                          CONVERT A DIGIT WEIGHT TO A DIGIT
  1602.      <n>       the digit weight (integer)
  1603.      returns   the digit character or NIL
  1604.  
  1605. (char-int <chr>)                          CONVERT A CHARACTER TO AN INTEGER
  1606.      <chr>     the character
  1607.      returns   the ASCII character code (range 0-255)
  1608.  
  1609. (int-char <int>)                          CONVERT AN INTEGER TO A CHARACTER
  1610.      <int>     the ASCII character code (treated modulo 256)
  1611.      returns   the character with that code
  1612.  
  1613. (char< <chr1> <chr2>...)
  1614. (char<= <chr1> <chr2>...)
  1615. (char= <chr1> <chr2>...)
  1616. (char/= <chr1> <chr2>...)
  1617. (char>= <chr1> <chr2>...)
  1618. (char> <chr1> <chr2>...)
  1619.      <chr1>    the first character to compare
  1620.      <chr2>    the second character(s) to compare
  1621.      returns   t if predicate is true, NIL otherwise
  1622.      Note: case is significant with these comparison functions.
  1623.  
  1624. (char-lessp <chr1> <chr2>...)
  1625. (char-not-greaterp <chr1> <chr2>...)
  1626. (char-equal <chr1> <chr2>...)
  1627. (char-not-equal <chr1> <chr2>...)
  1628. (char-not-lessp <chr1> <chr2>...)
  1629. (char-greaterp <chr1> <chr2>...)
  1630.      <chr1>    the first string to compare
  1631.      <chr2>    the second string(s) to compare
  1632.      returns   t if predicate is true, NIL otherwise
  1633.      Note: case is not  significant with these comparison functions  -- all
  1634.      uppercase characters are converted to lowercase before the comparison.
  1635.  
  1636.  
  1637. (defstruct name [<comment>] <slot-desc>...)
  1638. (defstruct (name <option>...) [<comment>] <slot-desc>...)
  1639.                fsubr
  1640.                <name>              the structure name symbol (quoted)
  1641.                <option>            option description (quoted)
  1642.                <comment>           comment string (ignored)
  1643.                <slot-desc>         slot descriptions (quoted)
  1644.                returns             the structure name
  1645. The recognized options are:
  1646.      (:conc-name name)
  1647.      (:include name [<slot-desc>...])
  1648.      (:print-function <function>)
  1649.  
  1650. (send <object> <message> [<args>...])                        SEND A MESSAGE
  1651.      <object>  the object to receive the message
  1652.      <message> message sent to object
  1653.      <args>    arguments to method (if any)
  1654.      returns   the result of the method
  1655.  
  1656. (send-super <message> [<args>])                SEND A MESSAGE TO SUPERCLASS
  1657.      valid only in method context
  1658.      <message> message sent to method's superclass
  1659.      <args>    arguments to method (if any)
  1660.      returns   the result of the method
  1661.  
  1662. (defclass <sym> <ivars> [<cvars> [<super>]])             DEFINE A NEW CLASS
  1663.      defined in class.lsp as a macro
  1664.      <sym>     symbol  whose value  is  to be  bound  to the  class  object
  1665.                (quoted)
  1666.      <ivars>   list  of instance  variables  (quoted).  Instance  variables
  1667.                specified  either as  <ivar> or  (<ivar> <init>)  to specify
  1668.                non-NIL default initial value.
  1669.      <cvars>   list of class variables (quoted)
  1670.      <super>   superclass, or Object if absent.
  1671.      This function  sends :SET-PNAME  (defined in  classes.lsp) to  the new
  1672.      class to set the class' print name instance variable.
  1673.      Methods defined for classes defined with defclass:
  1674.      (send <object> :<ivar>)
  1675.                Returns the specified instance variable
  1676.      (send <object> :SET-IVAR <ivar> <value>)
  1677.                Used to set an instance variable, typically with setf.
  1678.      (send <sym> :NEW {:<ivar> <init>})
  1679.                Actually   definition  for   :ISNEW.   Creates  new   object
  1680.                initializing  instance  variables  as  specified  in keyword
  1681.                arguments,  or  to  their  default if  keyword  argument  is
  1682.                missing. Returns the object.
  1683.  
  1684. (defmethod <class> <sym> <fargs> <expr> ...)            DEFINE A NEW METHOD
  1685.      defined in class.lsp as a macro
  1686.      <class>   Class which will respond to message
  1687.      <sym>     Message name (quoted)
  1688.      <fargs>   Formal argument list. Leading "self" is implied (quoted)
  1689.      <expr>    Expressions constituting body of method (quoted)
  1690.      returns   the class object.
  1691.  
  1692. (definst <class> <sym> [<args>...])            DEFINE A NEW GLOBAL INSTANCE
  1693.      defined in class.lsp as a macro
  1694.      <class>   Class of new object
  1695.      <sym>     Symbol whose value will be set to new object
  1696.      <args>    Arguments  passed  to  :NEW  (typically initial  values  for
  1697.                instance variables)
  1698.  
  1699. (atom <expr>)                                              IS THIS AN ATOM?
  1700.      <expr>    the expression to check
  1701.      returns   t if the value is an atom, NIL otherwise
  1702.  
  1703. (symbolp <expr>)                                          IS THIS A SYMBOL?
  1704.      <expr>    the expression to check
  1705.      returns   t if the expression is a symbol, NIL otherwise
  1706.  
  1707. (numberp <expr>)                                          IS THIS A NUMBER?
  1708.      <expr>    the expression to check
  1709.      returns   t if the expression is a number, NIL otherwise
  1710.  
  1711. (null <expr>)                                        IS THIS AN EMPTY LIST?
  1712.      <expr>    the list to check
  1713.      returns   t if the list is empty, NIL otherwise
  1714.  
  1715. (not <expr>)                                                 IS THIS FALSE?
  1716.      <expr>    the expression to check
  1717.      return    t if the value is NIL, NIL otherwise
  1718.  
  1719. (listp <expr>)                                              IS THIS A LIST?
  1720.      <expr>    the expression to check
  1721.      returns   t if the value is a cons or NIL, NIL otherwise
  1722.  
  1723. (endp <list>)                                    IS THIS THE END OF A LIST?
  1724.      <list>    the list
  1725.      returns   t if the value is NIL, NIL otherwise
  1726.  
  1727. (consp <expr>)                                    IS THIS A NON-EMPTY LIST?
  1728.      <expr>    the expression to check
  1729.      returns   t if the value is a cons, NIL otherwise
  1730.  
  1731. (constantp <expr>)                                      IS THIS A CONSTANT?
  1732.      <expr>    the expression to check
  1733.      returns   t if the value  is a constant (basically, would  EVAL <expr>
  1734.                repeatedly return the same thing?), NIL otherwise.
  1735.  
  1736. (specialp <expr>)                                 IS THIS A SPECIAL SYMBOL?
  1737.      <expr>    the expression to check
  1738.      returns   t if the value is a symbol which is SPECIAL, NIL otherwise.
  1739.  
  1740. (integerp <expr>)                                       IS THIS AN INTEGER?
  1741.      <expr>    the expression to check
  1742.      returns   t if the value is an integer, NIL otherwise
  1743.  
  1744. (floatp <expr>)                                            IS THIS A FLOAT?
  1745.      <expr>    the expression to check
  1746.      returns   t if the value is a float, NIL otherwise
  1747.  
  1748. (rationalp <expr>)                               IS THIS A RATIONAL NUMBER?
  1749.      Part of math extension.
  1750.      <expr>    the expression to check
  1751.      returns   t if the value is rational (integer or ratio), NIL otherwise
  1752.  
  1753. (complexp <expr>)                                 IS THIS A COMPLEX NUMBER?
  1754.      Part of math extension.
  1755.      <expr>    the expression to check
  1756.      returns   t if the value is a complex number, NIL otherwise
  1757.  
  1758. (stringp <expr>)                                          IS THIS A STRING?
  1759.      <expr>    the expression to check
  1760.      returns   t if the value is a string, NIL otherwise
  1761.  
  1762. (characterp <expr>)                                    IS THIS A CHARACTER?
  1763.      <expr>    the expression to check
  1764.      returns   t if the value is a character, NIL otherwise
  1765.  
  1766. (arrayp <expr>)                                           IS THIS AN ARRAY?
  1767.      <expr>    the expression to check
  1768.      returns   t if the value is an array, NIL otherwise
  1769.  
  1770. (streamp <expr>)                                          IS THIS A STREAM?
  1771.      <expr>    the expression to check
  1772.      returns   t if the value is a stream, NIL otherwise
  1773.  
  1774. (open-stream-p <stream>)                                    IS STREAM OPEN?
  1775.      <stream>  the stream
  1776.      returns   t if the stream is open, NIL otherwise
  1777.  
  1778. (input-stream-p <stream>)                               IS STREAM READABLE?
  1779.      <stream>  the stream
  1780.      returns   t if stream is readable, NIL otherwise
  1781.  
  1782. (output-stream-p <stream>)                              IS STREAM WRITABLE?
  1783.      <stream>  the stream
  1784.      returns   t if stream is writable, NIL otherwise
  1785.  
  1786. (objectp <expr>)                                         IS THIS AN OBJECT?
  1787.      <expr>    the expression to check
  1788.      returns   t if the value is an object, NIL otherwise
  1789.  
  1790. (classp <expr>)                                     IS THIS A CLASS OBJECT?
  1791.      <expr>    the expression to check
  1792.      returns   t if the value is a class object, NIL otherwise
  1793.  
  1794. (boundp <sym>)                             IS A VALUE BOUND TO THIS SYMBOL?
  1795.      <sym>     the symbol
  1796.      returns   t if a value is bound to the symbol, NIL otherwise
  1797.  
  1798. (fboundp <sym>)                 IS A FUNCTIONAL VALUE BOUND TO THIS SYMBOL?
  1799.      <sym>     the symbol
  1800.      returns   t  if a  functional  value  is  bound  to  the  symbol,  NIL
  1801.                otherwise
  1802.  
  1803. (functionp <sym>)                                       IS THIS A FUNCTION?
  1804.      Defined in common.lsp
  1805.      <expr>    the expression to check
  1806.      returns   t if the value  is a function -- that is,  can it be applied
  1807.                to arguments. This is  true for any symbol (even  those with
  1808.                no function binding), list with car being lambda, a closure,
  1809.                or subr. Otherwise returns NIL.
  1810.  
  1811. (minusp <expr>)                                    IS THIS NUMBER NEGATIVE?
  1812.      <expr>    the number to test
  1813.      returns   t if the number is negative, NIL otherwise
  1814.  
  1815. (zerop <expr>)                                         IS THIS NUMBER ZERO?
  1816.      <expr>    the number to test
  1817.      returns   t if the number is zero, NIL otherwise
  1818.  
  1819. (plusp <expr>)                                     IS THIS NUMBER POSITIVE?
  1820.      <expr>    the number to test
  1821.      returns   t if the number is positive, NIL otherwise
  1822.  
  1823. (evenp <expr>)                                        IS THIS INTEGER EVEN?
  1824.      <expr>    the integer to test
  1825.      returns   t if the integer is even, NIL otherwise
  1826.  
  1827. (oddp <expr>)                                          IS THIS INTEGER ODD?
  1828.      <expr>    the integer to test
  1829.      returns   t if the integer is odd, NIL otherwise
  1830.  
  1831. (subsetp <list1> <list2> &key :test :test-not :key)        IS SET A SUBSET?
  1832.      <list1>   the first list
  1833.      <list2>   the second list
  1834.      :test     test function (defaults to eql)
  1835.      :test-not test function (sense inverted)
  1836.      :key      function to  apply to  test function arguments  (defaults to
  1837.                identity)
  1838.      returns   t if  every element of the first list is in the second list,
  1839.                NIL otherwise
  1840.  
  1841. (eq <expr1> <expr2>)                             ARE THE EXPRESSIONS EQUAL?
  1842. (eql <expr1> <expr2>)
  1843. (equal <expr1> <expr2>)
  1844. (equalp <expr1> <expr2>)
  1845.      equalp defined in common.lsp
  1846.      <expr1>   the first expression
  1847.      <expr2>   the second expression
  1848.      returns   t  if  equal,  NIL  otherwise. Each  is  progressively  more
  1849.                liberal in what is "equal":
  1850.                eq: identical  pointers --  works with characters,  symbols,
  1851.                          and arbitrarily small integers
  1852.                eql: works with  all numbers, if  same type (see  also =  on
  1853.                page 53)
  1854.                equal: lists and strings
  1855.                equalp: case  insensitive characters (and  strings), numbers
  1856.                          of differing types, arrays (which can be equalp to
  1857.                          string containing same elements)
  1858.  
  1859. (typep <expr> <type>)                             IS THIS A SPECIFIED TYPE?
  1860.      <expr>    the expression to test
  1861.      <type>    the  type specifier.  Symbols  can either  be  one of  those
  1862.                listed under type-of (on page 86) or one of:
  1863.                ATOM      any atom
  1864.                NULL      NIL
  1865.                LIST      matches NIL or any cons cell
  1866.                STREAM    any stream
  1867.                NUMBER    any number type
  1868.                RATIONAL  fixnum or ratio (math extension)
  1869.                STRUCT    any structure (except hash-table)
  1870.                FUNCTION  any function, as defined by functionp (page 65)
  1871.                The specifer can also be  a form (which can be  nested). All
  1872.                form elements are quoted. Valid form cars:
  1873.                or        any of the cdr type specifiers must be true
  1874.                and       all of the cdr type specifiers must be true
  1875.                not       the single cdr type specifier must be false
  1876.                satisfies the  result of applying the cdr predicate function
  1877.                          to <expr>
  1878.                member    <expr> must be eql to one of the cdr values
  1879.                object    <expr> must  be an  object, of class  specified by
  1880.                          the  single  cdr value.  The  cdr value  can  be a
  1881.                          symbol which must evaluate to a class.
  1882.                Note that  everything is of type  T, and nothing  is of type
  1883.                NIL.
  1884.      returns   t if <expr> is of type <type>, NIL otherwise.
  1885.  
  1886. (cond <pair>...)                                     EVALUATE CONDITIONALLY
  1887.      fsubr
  1888.      <pair>    pair consisting of:
  1889.                (<pred> <expr>...)
  1890.                where
  1891.                <pred>    is a predicate expression
  1892.                <expr>    evaluated if the predicate is not NIL
  1893.      returns   the value of the first expression whose predicate is not NIL
  1894.  
  1895. (and <expr>...)                    THE LOGICAL AND OF A LIST OF EXPRESSIONS
  1896.      fsubr
  1897.      <expr>    the expressions to be ANDed
  1898.      returns   NIL if any  expression evaluates to NIL, otherwise the value
  1899.                of  the last  expression  (evaluation  of expressions  stops
  1900.                after the first expression that evaluates to NIL)
  1901.  
  1902. (or <expr>...)                      THE LOGICAL OR OF A LIST OF EXPRESSIONS
  1903.      fsubr
  1904.      <expr>    the expressions to be ORed
  1905.      returns   NIL if all expressions evaluate to NIL, otherwise  the value
  1906.                of the  first non-NIL expression (evaluation  of expressions
  1907.                stops  after the first expression  that does not evaluate to
  1908.                NIL)
  1909.  
  1910. (if <texpr> <expr1> [<expr2>])           EVALUATE EXPRESSIONS CONDITIONALLY
  1911.      fsubr
  1912.      <texpr>   the test expression
  1913.      <expr1>   the expression to be evaluated if texpr is non-NIL
  1914.      <expr2>   the expression to be evaluated if texpr is NIL
  1915.      returns   the value of the selected expression
  1916.  
  1917. (when <texpr> <expr>...)             EVALUATE ONLY WHEN A CONDITION IS TRUE
  1918.      fsubr
  1919.      <texpr>   the test expression
  1920.      <expr>    the expression(s) to be evaluted if texpr is non-NIL
  1921.      returns   the value of the last expression or NIL
  1922.  
  1923. (unless <texpr> <expr>...)          EVALUATE ONLY WHEN A CONDITION IS FALSE
  1924.      fsubr
  1925.      <texpr>   the test expression
  1926.      <expr>    the expression(s) to be evaluated if texpr is NIL
  1927.      returns   the value of the last expression or NIL
  1928.  
  1929. (case <expr> <case>...[(t <expr>)])                          SELECT BY CASE
  1930.      fsubr
  1931.      <expr>    the selection expression
  1932.      <case>    pair consisting of:
  1933.                (<value> <expr>...)
  1934.                where:
  1935.                <value>   is a  single expression  or a list  of expressions
  1936.                          (unevaluated)
  1937.                <expr>    are expressions to execute if the case matches
  1938.      (t <expr>)          default case (no previous matching)
  1939.      returns   the value of the last expression of the matching case
  1940.  
  1941. (let (<binding>...) <expr>...)                        CREATE LOCAL BINDINGS
  1942. (let* (<binding>...) <expr>...)                 LET WITH SEQUENTIAL BINDING
  1943.      fsubr
  1944.      <binding> the variable bindings each of which is either:
  1945.                1)        a symbol (which is initialized to NIL)
  1946.                2)        a  list whose car is a symbol and whose cadr is an
  1947.                          initialization expression
  1948.      <expr>    the expressions to be evaluated
  1949.      returns   the value of the last expression
  1950.  
  1951. (flet (<binding>...) <expr>...)                      CREATE LOCAL FUNCTIONS
  1952. (labels (<binding>...) <expr>...)             FLET WITH RECURSIVE FUNCTIONS
  1953. (macrolet (<binding>...) <expr>...)                     CREATE LOCAL MACROS
  1954.      fsubr
  1955.      <binding> the function bindings each of which is:
  1956.                (<sym> <fargs> <expr>...)
  1957.                where:
  1958.                <sym>     the function/macro name
  1959.                <fargs>   formal argument list (lambda list)
  1960.                <expr>    expressions   constituting   the   body   of   the
  1961.                          function/macro
  1962.      <expr>    the expressions to be evaluated
  1963.      returns   the value of the last expression
  1964.  
  1965. (catch <sym> <expr>...)               EVALUATE EXPRESSIONS AND CATCH THROWS
  1966.      fsubr
  1967.      <sym>     the catch tag
  1968.      <expr>    expressions to evaluate
  1969.      returns   the value of the last expression or the throw expression
  1970.  
  1971. (throw <sym> [<expr>])                                     THROW TO A CATCH
  1972.      fsubr
  1973.      <sym>     the catch tag
  1974.      <expr>    the value for the catch to return (defaults to NIL)
  1975.      returns   never returns
  1976.  
  1977. (unwind-protect <expr> <cexpr>...)      PROTECT EVALUATION OF AN EXPRESSION
  1978.      fsubr
  1979.      <expr>    the expression to protect
  1980.      <cexpr>   the cleanup expressions
  1981.      returns   the value of the expression
  1982.      Note:   unwind-protect guarantees  to execute the  cleanup expressions
  1983.      even  if a non-local exit  terminates the evaluation  of the protected
  1984.      expression
  1985.  
  1986. (loop <expr>...)                                         BASIC LOOPING FORM
  1987.      fsubr
  1988.      <expr>    the body of the loop
  1989.      returns   never returns (must use non-local exit, such as RETURN)
  1990.  
  1991. (do (<binding>...) (<texpr> <rexpr>...) <expr>...)     GENERAL LOOPING FORM
  1992. (do* (<binding>...) (<texpr> <rexpr>...) <expr>...)
  1993.      fsubr. do binds simultaneously, do* binds sequentially
  1994.      <binding> the variable bindings each of which is either:
  1995.                1)        a symbol (which is initialized to NIL)
  1996.                2)        a list of the form: (<sym> <init> [<step>])
  1997.                where:
  1998.                          <sym>     is the symbol to bind
  1999.                          <init>    the initial value of the symbol
  2000.                          <step>    a step expression
  2001.      <texpr>   the termination test expression
  2002.      <rexpr>   result expressions (the default is NIL)
  2003.      <expr>    the body of the loop (treated like an implicit prog)
  2004.      returns   the value of the last result expression
  2005.  
  2006. (dolist (<sym> <expr> [<rexpr>]) <expr>...)             LOOP THROUGH A LIST
  2007.      fsubr
  2008.      <sym>     the symbol to bind to each list element
  2009.      <expr>    the list expression
  2010.      <rexpr>   the result expression (the default is NIL)
  2011.      <expr>    the body of the loop (treated like an implicit prog)
  2012.      returns   the result expression
  2013.  
  2014. (dotimes (<sym> <expr> [<rexpr>]) <expr>...)          LOOP FROM ZERO TO N-1
  2015.      fsubr
  2016.      <sym>     the symbol to bind to each value from 0 to n-1
  2017.      <expr>    the number of times to loop
  2018.      <rexpr>   the result expression (the default is NIL)
  2019.      <expr>    the body of the loop (treated like an implicit prog)
  2020.      returns   the result expression
  2021.  
  2022. (prog (<binding>...) <expr>...)                         THE PROGRAM FEATURE
  2023. (prog* (<binding>...) <expr>...)               PROG WITH SEQUENTIAL BINDING
  2024.      fsubr -- equivalent to (let () (block NIL (tagbody ...)))
  2025.      <binding> the variable bindings each of which is either:
  2026.                1)        a symbol (which is initialized to NIL)
  2027.                2)        a list whose car is a  symbol and whose cadr is an
  2028.                          initialization expression
  2029.      <expr>    expressions to evaluate or tags (symbols)
  2030.      returns   NIL or the argument passed to the return function
  2031.  
  2032. (block <name> <expr>...)                                        NAMED BLOCK
  2033.      fsubr
  2034.      <name>    the block name (quoted symbol)
  2035.      <expr>    the block body
  2036.      returns   the value of the last expression
  2037.  
  2038. (return [<expr>])                  CAUSE A PROG CONSTRUCT TO RETURN A VALUE
  2039.      fsubr
  2040.      <expr>    the value (defaults to NIL)
  2041.      returns   never returns
  2042.  
  2043. (return-from <name> [<value>])        RETURN FROM A NAMED BLOCK OR FUNCTION
  2044.      fsubr.  In traditional  Xlisp,  the names  are  dynamically scoped.  A
  2045.      compilation option (default) uses lexical scoping like Common Lisp.
  2046.      <name>    the  block or function name (quoted symbol). If name is NIL,
  2047.                use function RETURN.
  2048.      <value>   the value to return (defaults to NIL)
  2049.      returns   never returns
  2050.  
  2051. (tagbody <expr>...)                                       BLOCK WITH LABELS
  2052.      fsubr
  2053.      <expr>    expression(s) to evaluate or tags (symbols)
  2054.      returns   NIL
  2055.  
  2056. (go <sym>)                                     GO TO A TAG WITHIN A TAGBODY
  2057.      fsubr.  In   traditional  Xlisp,   tags  are  dynamically   scoped.  A
  2058.      compilation option (default) uses lexical scoping like Common Lisp.
  2059.      <sym>     the tag (quoted)
  2060.      returns   never returns
  2061.  
  2062. (progv <slist> <vlist> <expr>...)                  DYNAMICALLY BIND SYMBOLS
  2063.      fsubr
  2064.      <slist>   list of symbols (evaluated)
  2065.      <vlist>   list of values to bind to the symbols (evaluated)
  2066.      <expr>    expression(s) to evaluate
  2067.      returns   the value of the last expression
  2068.  
  2069. (prog1 <expr1> <expr>...)                  EXECUTE EXPRESSIONS SEQUENTIALLY
  2070.      fsubr
  2071.      <expr1>   the first expression to evaluate
  2072.      <expr>    the remaining expressions to evaluate
  2073.      returns   the value of the first expression
  2074.  
  2075. (prog2 <expr1> <expr2> <expr>...)          EXECUTE EXPRESSIONS SEQUENTIALLY
  2076.      fsubr
  2077.      <expr1>   the first expression to evaluate
  2078.      <expr2>   the second expression to evaluate
  2079.      <expr>    the remaining expressions to evaluate
  2080.      returns   the value of the second expression
  2081.  
  2082. (progn <expr>...)                          EXECUTE EXPRESSIONS SEQUENTIALLY
  2083.      fsubr
  2084.      <expr>    the expressions to evaluate
  2085.      returns   the value of the last expression (or NIL)
  2086.  
  2087. (read [<stream> [<eofp> [<eof> [<rflag>]]]])             READ AN EXPRESSION
  2088.      NOTE:  there has been an  incompatible change in  arguments from prior
  2089.      versions.
  2090.      <stream>  the input stream (default, or NIL, is *standard-input*, T is
  2091.                *terminal-io*)
  2092.      <eofp>    When T,  signal an  error on end  of file,  when NIL  return 
  2093.                <eof> (default is T)
  2094.      <eof>     the value to return on end of file (default is NIL)
  2095.      <rflag>   recursive read flag. The value is ignored
  2096.      returns   the expression read
  2097.  
  2098. (set-macro-character <ch> <fcn> [ T ])                    MODIFY READ TABLE
  2099.      defined in init.lsp
  2100.      <ch>      character to define
  2101.      <fcn>     function to bind to character (see page 12)
  2102.      T         if TMACRO rather than NMACRO
  2103.  
  2104. (get-macro-character <ch>)                               EXAMINE READ TABLE
  2105.      defined in init.lsp
  2106.      <ch>      character
  2107.      returns   function bound to character
  2108.  
  2109. (print <expr> [<stream>])                 PRINT AN EXPRESSION ON A NEW LINE
  2110.      The expression is printed using prin1, then current line is terminated
  2111.      (Note: this is backwards from Common Lisp).
  2112.      <expr>    the expression to be printed
  2113.      <stream>  the output stream (default,  or NIL, is *standard-output*, T
  2114.                is *terminal-io*)
  2115.      returns   the expression
  2116.  
  2117. (prin1 <expr> [<stream>])                               PRINT AN EXPRESSION
  2118.      symbols, cons cells (without circularities), arrays, strings, numbers,
  2119.      and characters are  printed in  a format generally  acceptable to  the
  2120.      read  function.  Printing  format  can  be  affected   by  the  global
  2121.      formatting variables:  *print-level* and *print-length*  for lists and
  2122.      arrays,  *integer-format*  for  fixnums, *float-format*  for  flonums,
  2123.      *ratio-format* for ratios,  and *print-case* and  *readtable-case* for
  2124.      symbols.
  2125.      <expr>    the expression to be printed
  2126.      <stream>  the output stream (default,  or NIL, is *standard-output*, T
  2127.                is *terminal-io*)
  2128.      returns   the expression
  2129.  
  2130. (princ <expr> [<stream>])               PRINT AN EXPRESSION WITHOUT QUOTING
  2131.      Like  PRIN1  except  symbols  (including   uninterned),  strings,  and
  2132.      characters are printed without using any quoting mechanisms.
  2133.      <expr>    the expressions to be printed
  2134.      <stream>  the output stream (default,  or NIL, is *standard-output*, T
  2135.                is *terminal-io*)
  2136.      returns   the expression
  2137.  
  2138. (pprint <expr> [<stream>])                       PRETTY PRINT AN EXPRESSION
  2139.      Uses prin1 for printing.
  2140.      <expr>    the expressions to be printed
  2141.      <stream>  the output stream (default,  or NIL, is *standard-output*, T
  2142.                is *terminal-io*)
  2143.      returns   the expression
  2144.  
  2145. (terpri [<stream>])                        TERMINATE THE CURRENT PRINT LINE
  2146.      <stream>  the output stream (default,  or NIL, is *standard-output*, T
  2147.                is *terminal-io*)
  2148.      returns   NIL
  2149.  
  2150. (fresh-line [<stream>])                                    START A NEW LINE
  2151.      <stream>  the output stream (default,  or NIL, is *standard-output*, T
  2152.                is *terminal-io*)
  2153.      returns   t  if a new list was started, NIL if already at the start of
  2154.                a line.
  2155.  
  2156. (flatsize <expr>)              LENGTH OF PRINTED REPRESENTATION USING PRIN1
  2157.      <expr>    the expression
  2158.      returns   the length
  2159.  
  2160. (flatc <expr>)                 LENGTH OF PRINTED REPRESENTATION USING PRINC
  2161.      <expr>    the expression
  2162.      returns   the length
  2163.  
  2164. (y-or-n-p [<fmt> [<arg>...]])                      ASK A YES OR NO QUESTION
  2165. (yes-or-no-p [<fmt> [<arg>...]])
  2166.      defined in  common.lsp.  Uses *terminal-io*  stream  for  interaction.
  2167.      y-or-n-p  strives for a single character  response,  using get-key  if
  2168.      defined.
  2169.      <fmt>     optional format string for question (see page 75)
  2170.      <arg>     arguments, if any, for format string
  2171.      returns   T for yes, NIL for no.
  2172.  
  2173. (format <stream> <fmt> [<arg>...])                      DO FORMATTED OUTPUT
  2174.      <stream>  the output stream (T is *standard-output*)
  2175.      <fmt>     the format string
  2176.      <arg>     the format arguments
  2177.      returns   output string if <stream> is NIL, NIL otherwise
  2178. The format string can contain characters that  should be copied directly to
  2179. the output and formatting directives. The formatting directives are:
  2180.      ~A or ~a  print next argument using princ
  2181.      ~S or ~s  print next argument using prin1
  2182.      ~D or ~d  print next argument integer
  2183.      ~E or ~e  print next argument in exponential form
  2184.      ~F or ~f  print next argument in fixed point form
  2185.      ~G or ~g  print next  argument  using either  ~E  or ~F  depending  on
  2186.                magnitude
  2187.      ~O or ~o  print next argument as octal integer
  2188.      ~X or ~x  print next argument as hexidecimal integer
  2189.      ~%        start a new line
  2190.      ~&        start a new line if not on a new line
  2191.      ~|        start a new page
  2192.      ~?        use next argument as recursive format string
  2193.      ~( ~)     process format string with case conversion
  2194.      ~{ ~}     process format string repetitively
  2195.      ~[ ~; ~]  process format string conditionally
  2196.      ~*        skip arguments
  2197.      ~t or ~T  go to a specified column
  2198.      ~~        print a tilde character
  2199.      ~\n       ignore return and following whitespace
  2200.  
  2201. (read-char [<stream>[<eofp>[<eof>]]])        READ A CHARACTER FROM A STREAM
  2202.      NOTE: New eof arguments are incompatible with older XLISP versions.
  2203.      <stream>  the input stream (default, or NIL, is *standard-input*, T is
  2204.                *terminal-io*)
  2205.      <eofp>    When T,  signal an  error on end  of file,  when NIL  return 
  2206.                <eof> (default is T)
  2207.      <eof>     the value to return on end of file (default is NIL)
  2208.      returns   the character or <eof> at end of file
  2209.  
  2210. (peek-char [<flag> [<stream>]])                  PEEK AT THE NEXT CHARACTER
  2211.      <flag>    flag for skipping white space (default is NIL)
  2212.      <stream>  the input stream (default, or NIL, is *standard-input*, T is
  2213.                *terminal-io*)
  2214.      returns   the character or NIL at end of file
  2215.  
  2216. (write-char <ch> [<stream>])                  WRITE A CHARACTER TO A STREAM
  2217.      <ch>      the character to write
  2218.      <stream>  the output stream (default,  or NIL, is *standard-output*, T
  2219.                is *terminal-io*)
  2220.      returns   the character
  2221.  
  2222. (read-line [<stream>[<eofp>[<eof>]]])             READ A LINE FROM A STREAM
  2223.      NOTE: New eof arguments are incompatible with older XLISP versions.
  2224.      <stream>  the input stream (default, or NIL, is *standard-input*, T is
  2225.                *terminal-io*)
  2226.      <eofp>    When T,  signal an  error on end  of file,  when NIL  return 
  2227.                <eof> (default is T)
  2228.      <eof>     the value to return on end of file (default is NIL)
  2229.      returns   the string excluding the #\newline, or <eof> at end of file
  2230.  
  2231. (open <fname> &key :direction :element-type :if-exists :if-does-not-exist)
  2232.                                                          OPEN A FILE STREAM
  2233.      The function OPEN has been significantly enhanced over original XLISP.
  2234.      The original function only had the  :direction keyword argument, which
  2235.      could only  have  the values  :input or  :output. When  used with  the
  2236.      :output keyword, it was equivalent to (open <fname> :direction :output
  2237.      :if-exists :supersede). A maximum of ten files can be open  at any one
  2238.      time, including any files open via the LOAD, DRIBBLE, SAVE and RESTORE
  2239.      commands. The open command  may force a garbage collection  to reclaim
  2240.      file slots used by unbound file streams.
  2241.      <fname>        the file  name string,  symbol, or file  stream created
  2242.                     via OPEN. In the last case, the name is used  to open a
  2243.                     second stream  on  the  same  file --  this  can  cause
  2244.                     problems if one or more streams is used for writing.
  2245.      :direction     Read  and  write  permission  for  stream  (default  is
  2246.                     :input).
  2247.        :input       Open file for read operations only.
  2248.        :probe       Open file for reading,  then close it (use to  test for
  2249.                     file existance)
  2250.        :output      Open file for write operations only.
  2251.        :io          Like :output, but reading also allowed.
  2252.      :element-type  FIXNUM or CHARACTER (default is CHARACTER), as returned
  2253.                     by  type-of function  (on page  86). Files  opened with
  2254.                     type FIXNUM  are binary  files instead of  ascii, which
  2255.                     means no  crlf to/from  lf conversion takes  place, and
  2256.                     control-Z will not terminate an  input file. It is  the
  2257.                     intent  of  Common  Lisp  that  binary  files  only  be
  2258.                     accessed  with  read-byte  and write-byte  while  ascii
  2259.                     files be  accessed with any function  but read-byte and
  2260.                     write-byte. XLISP does not enforce that distinction.
  2261.      :if-exists     action  to take  if file  exists. Argument  ignored for
  2262.                     :input (file is positioned at start) or :probe (file is
  2263.                     closed)
  2264.        :error       give error message
  2265.        :rename      rename file to generated backup  name, then open a  new
  2266.                     file of the original name. This is the default action
  2267.        :new-version same as :rename
  2268.        :overwrite   file is positioned to start, original data intact
  2269.        :append      file is positioned to end
  2270.        :supersede   delete original file and open new file of the same name
  2271.        :rename-and-delete  same as :supersede
  2272.        NIL          close file and return NIL
  2273.      :if-does-not-exist    action to take if file does not exist.
  2274.        :error       give error  message (default for :input,  or :overwrite
  2275.                     or :append)
  2276.        :create      create  a new file (default for :output or :io when not
  2277.                     :overwrite or :append)
  2278.        NIL          return NIL (default for :probe)
  2279.      returns        a file stream, or sometimes NIL
  2280.  
  2281. (close <stream>)                                        CLOSE A FILE STREAM
  2282.      The stream becomes a  "closed stream." Note that unbound  file streams
  2283.      are closed automatically during a garbage collection.
  2284.      <stream>  the stream, which may be a string stream
  2285.      returns   t  if stream closed, NIL  if terminal (cannot  be closed) or
  2286.                already closed.
  2287.  
  2288. (delete-file <fname>)                                         DELETE A FILE
  2289.      <fname>   file name string, symbol or a stream opened with OPEN
  2290.      returns   t  if file  does not exist  or is  deleted. If  <fname> is a
  2291.                stream,  the stream is closed before the file is deleted. An
  2292.                error occurs if the file cannot be deleted.
  2293.  
  2294. (truename <fname>)                                OBTAIN THE FILE PATH NAME
  2295.      <fname>   file name string, symbol, or a stream opened with OPEN
  2296.      returns   string  representing the  true file  name (absolute  path to
  2297.      file).
  2298.  
  2299. (with-open-file (<var> <fname> [<karg>...]) [<expr>...])
  2300.                                                       EVALUATE USING A FILE
  2301.      Defined in common.lsp  as a  macro. File  will always  be closed  upon
  2302.      completion
  2303.      <var>     symbol name to bind  stream to while evaluating expresssions
  2304.                (quoted)
  2305.      <fname>   file name string or symbol
  2306.      <karg>    keyword arguments for the implicit open command
  2307.      <expr>    expressions to evaluate while file is open (implicit progn)
  2308.      returns   value of last <expr>.
  2309.  
  2310. (read-byte [<stream>[<eofp>[<eof>]]])             READ A BYTE FROM A STREAM
  2311.      NOTE: New eof arguments are incompatible with older XLISP versions.
  2312.      <stream>  the input stream (default, or NIL, is *standard-input*, T is
  2313.                *terminal-io*)
  2314.      <eofp>    When T,  signal an  error on end  of file,  when NIL  return 
  2315.                <eof> (default is T)
  2316.      <eof>     the value to return on end of file (default is NIL)
  2317.      returns   the byte (integer) or <eof> at end of file
  2318.  
  2319. (write-byte <byte> [<stream>])                     WRITE A BYTE TO A STREAM
  2320.      <byte>    the byte to write (integer)
  2321.      <stream>  the output stream (default,  or NIL, is *standard-output*, T
  2322.                is *terminal-io*)
  2323.      returns   the byte (integer)
  2324.  
  2325. (file-length <stream>)                                   GET LENGTH OF FILE
  2326.      For an ascii file, the  length reported may be larger than  the number
  2327.      of characters read or written because of CR conversion.
  2328.      <stream>  the file stream (should be disk file)
  2329.      returns   length of file, or NIL if cannot be determined.
  2330.  
  2331. (file-position <stream> [<expr>])                  GET OR SET FILE POSITION
  2332.      For an ascii file, the file position may not be the same as the number
  2333.      of characters read  or written  because of CR  conversion. It will  be
  2334.      correct  when using  file-position to  position a  file at  a location
  2335.      earlier reported by file-position.
  2336.      <stream>  the file stream (should be a disk file)
  2337.      <expr>    desired  file position,  if  setting position.  Can also  be
  2338.                :start for start of file or :end for end of file.
  2339.      returns   if  setting position,  and  successful, then  T; if  getting
  2340.                position and successful then the position; otherwise NIL
  2341.  
  2342. (make-string-input-stream <str> [<start> [<end>]])
  2343.      <str>     the string
  2344.      <start>   the starting offset
  2345.      <end>     the ending offset + 1 or NIL for end of string
  2346.      returns   an unnamed stream that reads from the string
  2347.  
  2348. (make-string-output-stream)
  2349.      returns   an unnamed output stream
  2350.  
  2351. (get-output-stream-string <stream>)
  2352.      The output stream is emptied by this function
  2353.      <stream>  the output stream
  2354.      returns   the output so far as a string
  2355.  
  2356. (get-output-stream-list <stream>)
  2357.      The output stream is emptied by this function
  2358.      <stream>  the output stream
  2359.      returns   the output so far as a list
  2360.  
  2361. (with-input-from-string (<var> <str> &key :start :end :index) [<expr>...])
  2362.      Defined in common.lsp as a macro
  2363.      <var>     symbol  that   stream  is  bound  to   during  execution  of
  2364.                expressions (quoted)
  2365.      <str>     the string
  2366.      :start    starting offset into string (default 0)
  2367.      :end      ending offset + 1  (default, or NIL, is end of string)
  2368.      :index    setf  place form which  gets final  index into  string after
  2369.                last expression is executed (quoted)
  2370.      <expr>    expressions to evaluate (implicit progn)
  2371.      returns   the value of the last <expr>
  2372.  
  2373. (with-output-to-string (<var>) [<expr>...])
  2374.      Defined in common.lsp as a macro
  2375.      <var>     symbol  that   stream  is  bound  to   during  execution  of
  2376.                expressions (quoted)
  2377.      <expr>    expressions to evaluate (implicit progn)
  2378.      returns   contents of stream, as a string
  2379.  
  2380. (trace [<sym>...])                         ADD A FUNCTION TO THE TRACE LIST
  2381.      fsubr
  2382.      <sym>     the function(s) to add (quoted)
  2383.      returns   the trace list
  2384.  
  2385. (untrace [<sym>...])                  REMOVE A FUNCTION FROM THE TRACE LIST
  2386.      fsubr. If no functions given, all functions are removed from the trace
  2387.      list.
  2388.      <sym>     the function(s) to remove (quoted)
  2389.      returns   the trace list
  2390.  
  2391. (error <emsg> {<arg>})                       SIGNAL A NON-CORRECTABLE ERROR
  2392.      Note  that the definition  of this function has  changed from 2.1e and
  2393.      earlier so to match Common Lisp.
  2394.      <emsg>    the error message string, which is processed by FORMAT
  2395.      <arg>     optional argument{s} for FORMAT 
  2396.      returns   never returns
  2397.  
  2398. (cerror <cmsg> <emsg> {<arg>})                   SIGNAL A CORRECTABLE ERROR
  2399.      Note that the definition  of this function  has changed from 2.1e  and
  2400.      earlier so to match Common Lisp.
  2401.      <cmsg>    the continue message string, which is processed by FORMAT
  2402.      <emsg>    the error message string, which is processed by FORMAT
  2403.      <arg>     optional argument(s) for both FORMATs (arguments are useable
  2404.                twice)
  2405.      returns   NIL when continued from the break loop
  2406.  
  2407. (break <bmsg> {<arg>})                                   ENTER A BREAK LOOP
  2408.      Note that the  definition of this function  has changed from 2.1e  and
  2409.      earlier so to match Common Lisp.
  2410.      <bmsg>    the break message string, which is processed by FORMAT
  2411.      <arg>     optional argument(s) for FORMAT
  2412.      returns   NIL when continued from the break loop
  2413.  
  2414. (clean-up)                                          CLEAN-UP AFTER AN ERROR
  2415.      returns   never returns
  2416.  
  2417. (top-level)             CLEAN-UP AFTER AN ERROR AND RETURN TO THE TOP LEVEL
  2418.      Runs  the function in  variable *top-level-loop*  (ususally TOP-LEVEL-
  2419. LOOP)
  2420.      returns   never returns
  2421.  
  2422. (continue)                                CONTINUE FROM A CORRECTABLE ERROR
  2423.      returns   never returns
  2424.  
  2425. (errset <expr> [<pflag>])                                       TRAP ERRORS
  2426.      fsubr
  2427.      <expr>    the expression to execute
  2428.      <pflag>   flag to control printing of the error message (default t)
  2429.      returns   the value of  the last expression consed with NIL  or NIL on
  2430.                error
  2431.  
  2432. (baktrace [<n>])                   PRINT N LEVELS OF TRACE BACK INFORMATION
  2433.      <n>       the number of levels (defaults to all levels)
  2434.      returns   NIL
  2435.  
  2436. (evalhook <expr> <ehook> <ahook> [<env>])               EVALUATE WITH HOOKS
  2437.      <expr>    the expression to evaluate.  <ehook> is not used at  the top
  2438.                level.
  2439.      <ehook>   the value for *evalhook*
  2440.      <ahook>   the value for *applyhook*
  2441.      <env>     the  environment (default  is NIL). The  format is  a dotted
  2442.                pair of value (car)  and function (cdr) binding lists.  Each
  2443.                binding  list is a list  of level binding  a-lists, with the
  2444.                innermost a-list  first. The level binding a-list associates
  2445.                the bound symbol with its value.
  2446.      returns   the result of evaluating the expression
  2447.  
  2448. (applyhook <fun> <arglist> <ehook> <ahook>)                APPLY WITH HOOKS
  2449.      <fun>     The function closure. <ahook> is not used  for this function
  2450.                application.
  2451.      <arglist> The list of arguments.
  2452.      <ehook>   the value for *evalhook*
  2453.      <ahook>   the value for *applyhook*
  2454.      returns   the result of applying <fun> to <arglist>
  2455.  
  2456. (debug)                                                 ENABLE DEBUG BREAKS
  2457. (nodebug)                                              DISABLE DEBUG BREAKS
  2458.      Defined in init.lsp
  2459.  
  2460. (load <fname> &key :verbose :print)                      LOAD A SOURCE FILE
  2461.      An  implicit ERRSET exists  in this function  so that  if error occurs
  2462.      during  loading, and *breakenable* is NIL, then the error message will
  2463.      be printed and  NIL will  be returned. The  OS environmental  variable
  2464.      XLPATH is  used as a  search path for  files in this  function. If the
  2465.      filename  does not contain path  separators ('/' for  UNIX, and either
  2466.      '/' or  '\' for MS-DOS) and  XLPATH is defined, then  each pathname in
  2467.      XLPATH is tried in turn until a matching file is found.  If no file is
  2468.      found,  then one last  attempt is made  in the current  directory. The
  2469.      pathnames are separated by either a space or semicolon, and a trailing
  2470.      path separator character is optional.
  2471.      <fname>   the filename string,  symbol, or a file stream  created with
  2472.                OPEN. The extension "lsp" is assumed.
  2473.      :verbose  the verbose flag (default is t)
  2474.      :print    the print flag (default is NIL)
  2475.      returns   t if successful, else NIL
  2476.  
  2477. (restore <fname>)                             RESTORE WORKSPACE FROM A FILE
  2478.      The OS  environmental variable XLPATH  is used  as a  search path  for
  2479.      files in this function. See the note under function "load", above. The
  2480.      standard  system streams  are  restored to  the  defaults as  of  when
  2481.      XLISP-PLUS  was started. Files streams  are restored in  the same mode
  2482.      they were created, if possible, and  are positioned where they were at
  2483.      the time of the  save. If the files  have been altered or moved  since
  2484.      the time  of the save, the restore  will not be completely successful.
  2485.      Memory  allocation will  not be  the same as  the current  settings of
  2486.      ALLOC are  used. Execution  proceeds at the  top-level read-eval-print
  2487.      loop. The  state of  the transcript  logging is  not affected  by this
  2488.      function.
  2489.      <fname>   the filename string,  symbol, or a file stream  created with
  2490.                OPEN. The extension "wks" is assumed.
  2491.      returns   NIL on failure, otherwise never returns
  2492.  
  2493. (save <fname>)                                     SAVE WORKSPACE TO A FILE
  2494.      You cannot save from within a load.  Not all of the state may be saved
  2495.      -- see "restore", above. By saving a workspace with the  name "xlisp",
  2496.      that  workspace   will  be   loaded  automatically  when   you  invoke
  2497.      XLISP-PLUS.
  2498.      <fname>   the filename string,  symbol, or a file stream  created with
  2499.                OPEN. The extension "wks" is assumed.
  2500.      returns   t if workspace was written, NIL otherwise
  2501.  
  2502. (savefun <fcn>)                                     SAVE FUNCTION TO A FILE
  2503.      defined in init.lsp
  2504.      <fcn>     function name (saves it to file of same name, with extension
  2505.                ".lsp")
  2506.      returns   t if successful
  2507.  
  2508. (dribble [<fname>])            CREATE A FILE WITH A TRANSCRIPT OF A SESSION
  2509.      <fname>   file name string, symbol, or file stream created with OPEN
  2510.                (if missing, close current transcript)
  2511.      returns   t if the transcript is opened, NIL if it is closed
  2512.  
  2513. (gc)                                               FORCE GARBAGE COLLECTION
  2514.      returns   NIL
  2515.  
  2516. (expand [<num>])                           EXPAND MEMORY BY ADDING SEGMENTS
  2517.      <num>     the number of segments to add, default 1
  2518.      returns   the number of segments added
  2519.  
  2520. (alloc <num> [<num2>])                                  CHANGE SEGMENT SIZE
  2521.      <num>     the number of nodes to allocate
  2522.      <num2>    the  number  of pointer  elements  to allocate  in  an array
  2523.                segment (when dynamic array allocation compiled). Default is
  2524.                no change.
  2525.      returns   the old number of nodes to allocate
  2526.  
  2527. (room)                                    SHOW MEMORY ALLOCATION STATISTICS
  2528.      Statistics (which are sent to *STANDARD-OUTPUT*) include:
  2529.                Nodes - number of nodes, free and used
  2530.                Free nodes - number of free nodes
  2531.                Segments - number of node segments, including those reserved
  2532.                          for characters and small integers.
  2533.                Allocate  -  number of  nodes to  allocate  in any  new node
  2534.                          segments
  2535.                Total  - total  memory  bytes allocated  for node  segments,
  2536.                          arrays, and strings
  2537.                Collections - number of garbage collections
  2538.                Time  -  time  spent  performing   garbage  collections  (in
  2539.                seconds)
  2540.      When dynamic  array allocation  is compiled, the  following additional
  2541.      statistics are printed:
  2542.                Vector  nodes  - number  of  pointers  in arrays  and  (size
  2543.                          equivalent) strings
  2544.                Vector free - free  space in vector area (may  be fragmented
  2545.                          across segments)
  2546.                Vector  segs  - number  of  vector  segments. Increases  and
  2547.                          decreases as needed.
  2548.                Vec allocate - number of pointer elements to allocate in any
  2549.                          new vector segment
  2550.      returns   NIL
  2551.  
  2552. (time <expr>)                                        MEASURE EXECUTION TIME
  2553.      fsubr.
  2554.      <expr>    the expression to evaluate
  2555.      returns   the result of  the expression. The execution time is printed
  2556.                to *TRACE-OUTPUT*
  2557.  
  2558. (get-internal-real-time)                             GET ELAPSED CLOCK TIME
  2559. (get-internal-run-time)                          GET ELAPSED EXECUTION TIME
  2560.      returns   integer      time      in       system      units       (see
  2561.                internal-time-units-per-second  on  page  23).   meaning  of
  2562.                absolute values is system dependent.
  2563.  
  2564. (coerce <expr> <type>)                  FORCE EXPRESSION TO DESIGNATED TYPE
  2565.      Sequences  can  be  coerced  into other  sequences,  single  character
  2566.      strings or  symbols with  single character  printnames can  be coerced
  2567.      into characters, fixnums  can be coerced  into characters or  flonums.
  2568.      Ratios can be coerced into flonums. Flonums and  ratios can be coerced
  2569.      into complex (so can fixnums, but they turn back into fixnums).
  2570.      <expr>    the expression to coerce
  2571.      <type>    desired type, as returned by type-of (see page 86)
  2572.      returns   <expr> if type is correct, or converted object.
  2573.  
  2574. (type-of <expr>)                         RETURNS THE TYPE OF THE EXPRESSION
  2575.      It is recommended that typep  be used instead, as it is  more general.
  2576.      In the original XLISP, the value NIL was returned for NIL.
  2577.      <expr>    the expression to return the type of
  2578.      returns   One of the symbols:
  2579.                LIST                for NIL (lists, conses return CONS)
  2580.                SYMBOL              for symbols
  2581.                OBJECT              for objects
  2582.                CONS                for conses
  2583.                SUBR                for built-in functions
  2584.                FSUBR               for special forms
  2585.                CLOSURE             for defined functions
  2586.                STRING              for strings
  2587.                FIXNUM              for integers
  2588.                RATIO               for ratios
  2589.                FLONUM              for floating point numbers
  2590.                COMPLEX             for complex numbers
  2591.                CHARACTER           for characters
  2592.                FILE-STREAM         for file pointers
  2593.                UNNAMED-STREAM      for unnamed streams
  2594.                ARRAY               for arrays
  2595.                HASH-TABLE          for hash tables
  2596.                sym                 for structures of type "sym"
  2597.  
  2598. (peek <addrs>)                                 PEEK AT A LOCATION IN MEMORY
  2599.      <addrs>   the address to peek at (integer)
  2600.      returns   the value at the specified address (integer)
  2601.  
  2602. (poke <addrs> <value>)                             POKE A VALUE INTO MEMORY
  2603.      <addrs>   the address to poke (integer)
  2604.      <value>   the value to poke into the address (integer)
  2605.      returns   the value
  2606.  
  2607. (address-of <expr>)                        GET THE ADDRESS OF AN XLISP NODE
  2608.      <expr>    the node
  2609.      returns   the address of the node (integer)
  2610.  
  2611. (get-key)                                     READ A KEYSTROKE FROM CONSOLE
  2612.      OS dependent.
  2613.      returns   integer value of key (no echo)
  2614.  
  2615. (system <command>)                                 EXECUTE A SYSTEM COMMAND
  2616.      OS dependent -- not always available.
  2617.      <command> Command string, if 0 length then spawn OS shell
  2618.      returns   T if successful (note that MS/DOS command.com always returns
  2619.                success)
  2620.  
  2621. (set-stack-mark <size>)                      SET SYSTEM STACK WARNING POINT
  2622.      OS  dependent --  not  always available.  The  system will  perform  a
  2623.      continuable  error when the  amount of  remaining system  stack passes
  2624.      below this setting. The trap is reset  at the top-level. This function
  2625.      is useful for debugging runaway recursive functions.
  2626.      <size>    Remaining stack,  in bytes.  Minimum value  is fixed  at the
  2627.                value that causes the system stack overflow error, while the
  2628.                maximum value is limitied to somewhat less than  the current
  2629.                remaining stack space. Use "0" to turn the warnings off.
  2630.      returns   the previous value.
  2631.  
  2632. (top-level-loop)                                     DEFAULT TOP LEVEL LOOP
  2633.      Runs  the XLISP  top  level read-eval-print  loop, described  earlier.
  2634.      Never returns.
  2635.  
  2636. (reset-system)                                          FLUSH INPUT BUFFERS
  2637.      Used by user-implemented top level loops to flush the input buffer
  2638.      returns   NIL
  2639.  
  2640. (exit)                                                           EXIT XLISP
  2641.      returns   never returns
  2642.  
  2643. (generic <expr>)              CREATE A GENERIC TYPED COPY OF THE EXPRESSION
  2644.      Note: added function, Tom Almy's creation for debugging xlisp.
  2645.      <expr>    the expression to copy
  2646.      returns   NIL if  value is NIL  and NILSYMBOL  compilation option  not
  2647.                declared, otherwise if type is:
  2648.                SYMBOL              copy as an ARRAY
  2649.                OBJECT              copy as an ARRAY
  2650.                CONS                (CONS (CAR <expr>)(CDR <expr>))
  2651.                CLOSURE             copy as an ARRAY
  2652.                STRING              copy of the string
  2653.                FIXNUM              value
  2654.                FLONUM              value
  2655.                RATIO               value
  2656.                CHARACTER           value
  2657.                UNNAMED-STREAM      copy as a CONS
  2658.                ARRAY               copy of the array
  2659.                COMPLEX             copy as an ARRAY
  2660.                HASH-TABLE          copy as an ARRAY
  2661.                structure           copy as an ARRAY
  2662.  
  2663. (eval-when <condition> <body> ...)
  2664.      Macro  defined in common.lsp, and provided to assist in porting Common
  2665.      Lisp applications to XLISP-PLUS.
  2666.      <condition>         List of conditions
  2667.      <body>    expressions which are evaluated if  one of the conditions is
  2668.                EXECUTE or LOAD.
  2669.      returns   result of last body expression
  2670.  
  2671. (cls)                                                         CLEAR DISPLAY
  2672.      Clear the display and position cursor at upper left corner.
  2673.      returns   nil
  2674.  
  2675. (cleol)                                                CLEAR TO END OF LINE
  2676.      Clears current line to end.
  2677.      returns   nil
  2678.  
  2679. (goto-xy [<column> <row>])                       GET OR SET CURSOR POSITION
  2680.      Cursor   is  repositioned   if  optional   arguments   are  specified.
  2681.      Coordinates are clipped to actual size of display.
  2682.      <column>  0-based column (x coordinate)
  2683.      <row>     0-based row (y coordinate)
  2684.      returns   list of original column and row positions
  2685.  
  2686. (color <value>)                                           SET DRAWING COLOR
  2687.      <value>   Drawing color (not checked for validity)
  2688.      returns   <value>
  2689.  
  2690. (move <x1> <y1> [<x2> <y2> ...])                              ABSOLUTE MOVE
  2691. (moverel <x1> <y2> [<x2> <y2> ...])                           RELATIVE MOVE
  2692.      For moverel, all coordinates are relative to the preceeding point.
  2693.      <x1> <y1> Moves to point x1,y1 in anticipation of draw.
  2694.      <x2> <y2> Draws to points specified in additional arguments.
  2695.      returns   T if succeeds, else NIL
  2696.  
  2697. (draw [<x1> <y1> ...])                                        ABSOLUTE DRAW
  2698. (drawrel [<x1> <y1> ...])                                     RELATIVE DRAW
  2699.      For drawrel, all coordinates are relative to the preceeding point.
  2700.      <x1> <y1> Point(s) drawn to, in order.
  2701.      returns   T if succeeds, else NIL
  2702.  
  2703. (mode <ax> [<bx> <width> <height>)                         SET DISPLAY MODE
  2704.      Standard modes require only <ax> argument. Extended modes are  "Super-
  2705.      VGA"  or  "Super-EGA" and  are display  card  specific. Not  all XLISP
  2706.      versions support all modes.
  2707.      <ax>      Graphic mode (value passed in register AX)
  2708.                Common standard Modes:
  2709.                0,1 - 40x25 text
  2710.                2,3 - 80x25 text
  2711.                4,5 - 320x200 4 color graphics (CGA)
  2712.                6 - 640x200 monchrome graphics (CGA)
  2713.                13 - 320x200 16 color graphics (EGA)
  2714.                14 - 640x200 16 color graphics (EGA)
  2715.                16 - 640x350 16 color graphics (EGA)
  2716.                18 - 640x480 16 color graphics (VGA)
  2717.                19 - 320x200 256 color graphics (VGA)
  2718.      <bx>      BX value for some extended graphic modes
  2719.      <width>   width for extended graphic modes
  2720.      <height>  height for extended graphic modes
  2721.      returns   a list of the number of columns, number of lines (1 for CGA),
  2722.                maximum  X  graphic coordinate (-1 for text modes),  and  the
  2723.                maximum  Y graphic coordinate (-1 for text modes), or NIL  if 
  2724.            fails
  2725.